8000 Is CGImageWithCorrectOrientation really necessary? · Issue #45 · gavinbunney/Toucan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Is CGImageWithCorrectOrientation really necessary? #45
Open
@kean

Description

@kean

Hey! I just noticed that each operation in Toucan starts off with a call to CGImageWithCorrectOrientation function which involves creating a new context and drawing an image into it. So, for example, if I want to crop an image with UIImageOrientation.Left then instead of simply cropping the image (which is extremely fast) Toucan would first physically rotate its bitmap (which is much more expensive then cropping itself) and just then crop the image. It would also change the image orientation to UIImageOrientation.Up.

I understand that it might be tempting to just "fix" an orientation so that all the other functions would only have to deal with images in UIImageOrientation.Up. However, if would be nice if Toucan could add a proper support for images in all orientations.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0