Giter Site home page Giter Site logo

Comments (4)

erica avatar erica commented on September 26, 2024

Can you please check the update I just pushed to help check my fixes? Thanks. -- E

On Mar 31, 2014, at 1:50 AM, DrAma999 [email protected] wrote:

I think that some orientation are inverted:

UIImageOrientationRight, should be equal to 6 EXIF
UIImageOrientationLeft should be equal to 8 EXF
To reproduce just capture a stil image form the camera in the portrait orientation, the metadata give is the number 6.
This GIST from Peter confirm that https://gist.github.com/steipete/4666527

Thanks,
Andrea


Reply to this email directly or view it on GitHub.

from camera-image-helper.

DrAma999 avatar DrAma999 commented on September 26, 2024

Yep, it does. I must say that I'm using only the ImageOrientation functions .
The only thing is probably not correct are the comments, I'm messing around the whole day with EXIF stuffs and still din't get the EXIF ref point in the iphone cameras.
In this page http://sylvana.net/jpegcrop/exif_orientation.html the EXIF 6 is right-top, like in the previous .h file.
Also Apple "somehow" states that, this snippet is from SquareCam sample I guess:
enum {
PHOTOS_EXIF_0ROW_TOP_0COL_LEFT = 1, // 1 = 0th row is at the top, and 0th column is on the left (THE DEFAULT).
PHOTOS_EXIF_0ROW_TOP_0COL_RIGHT = 2, // 2 = 0th row is at the top, and 0th column is on the right.
PHOTOS_EXIF_0ROW_BOTTOM_0COL_RIGHT = 3, // 3 = 0th row is at the bottom, and 0th column is on the right.
PHOTOS_EXIF_0ROW_BOTTOM_0COL_LEFT = 4, // 4 = 0th row is at the bottom, and 0th column is on the left.
PHOTOS_EXIF_0ROW_LEFT_0COL_TOP = 5, // 5 = 0th row is on the left, and 0th column is the top.
PHOTOS_EXIF_0ROW_RIGHT_0COL_TOP = 6, // 6 = 0th row is on the right, and 0th column is the top.
PHOTOS_EXIF_0ROW_RIGHT_0COL_BOTTOM = 7, // 7 = 0th row is on the right, and 0th column is the bottom.
PHOTOS_EXIF_0ROW_LEFT_0COL_BOTTOM = 8 // 8 = 0th row is on the left, and 0th column is the bottom.
};
I attach mine:
typedef NS_ENUM(NSUInteger,ExifOrientation) {
kTopLeft = 1, // UIImageOrientationUp, (0,0) at top left
kTopRight = 2, // UIImageOrientationUpMirrored, (0,0) at top right
kBottomRight = 3, // UIImageOrientationDown (0,0) at bottom right
kBottomLeft = 4, // UIImageOrientationDownMirrored (0,0) at bottom left
kLeftTop = 5, // UIImageOrientationLeftMirrored (0,0) at left top
kRightTop = 6, // UIImageOrientationRight (0,0) at right top
kRightBottom = 7, // UIImageOrientationRightMirrored (0,0) at right bottom
kLeftBottom = 8 // UIImageOrientationLeft (0,0) at left bottom
} ;

from camera-image-helper.

erica avatar erica commented on September 26, 2024

I'm pretty sure that site is the original source of my mistake from way way way back. If you look at the F's on my last commit, the updates better match the top-left corner of the "F". I updated all the "F" comments on the last commit as well as the look-ups and string maps. I think the Apple code you mention is probably sharing the same mistake I made based on the old docs. I'm also pretty sure there's still the recognizer bug I mention in-code because that bug isn't affected by the 6/8 swap.

Apple's UIImage naming scheme is a bit odd because left and right refer to the button position but up and down do not.

-- E

On Mar 31, 2014, at 9:59 AM, DrAma999 [email protected] wrote:

Yep, it does. I must say that I'm using only the ImageOrientation functions .
The only thing is probably not correct are the comments, I'm messing around the whole day with EXIF stuffs and still din't get the EXIF ref point in the iphone cameras.
In this page http://sylvana.net/jpegcrop/exif_orientation.html the EXIF 6 is right-top, like in the previous .h file.
Also Apple "somehow" states that, this snippet is from SquareCam sample I guess:
enum {
PHOTOS_EXIF_0ROW_TOP_0COL_LEFT = 1, // 1 = 0th row is at the top, and 0th column is on the left (THE DEFAULT).
PHOTOS_EXIF_0ROW_TOP_0COL_RIGHT = 2, // 2 = 0th row is at the top, and 0th column is on the right.
PHOTOS_EXIF_0ROW_BOTTOM_0COL_RIGHT = 3, // 3 = 0th row is at the bottom, and 0th column is on the right.
PHOTOS_EXIF_0ROW_BOTTOM_0COL_LEFT = 4, // 4 = 0th row is at the bottom, and 0th column is on the left.
PHOTOS_EXIF_0ROW_LEFT_0COL_TOP = 5, // 5 = 0th row is on the left, and 0th column is the top.
PHOTOS_EXIF_0ROW_RIGHT_0COL_TOP = 6, // 6 = 0th row is on the right, and 0th column is the top.
PHOTOS_EXIF_0ROW_RIGHT_0COL_BOTTOM = 7, // 7 = 0th row is on the right, and 0th column is the bottom.
PHOTOS_EXIF_0ROW_LEFT_0COL_BOTTOM = 8 // 8 = 0th row is on the left, and 0th column is the bottom.
};
I attach mine:
typedef NS_ENUM(NSUInteger,ExifOrientation) {
kTopLeft = 1, // UIImageOrientationUp, (0,0) at top left
kTopRight = 2, // UIImageOrientationUpMirrored, (0,0) at top right
kBottomRight = 3, // UIImageOrientationDown (0,0) at bottom right
kBottomLeft = 4, // UIImageOrientationDownMirrored (0,0) at bottom left
kLeftTop = 5, // UIImageOrientationLeftMirrored (0,0) at left top
kRightTop = 6, // UIImageOrientationRight (0,0) at right top
kRightBottom = 7, // UIImageOrientationRightMirrored (0,0) at right bottom
kLeftBottom = 8 // UIImageOrientationLeft (0,0) at left bottom
} ;


Reply to this email directly or view it on GitHub.

from camera-image-helper.

DrAma999 avatar DrAma999 commented on September 26, 2024

Well, I'm so fat-head when I find things that I do not understand, that I went to this documentation from MIT about EXIF format http://www.media.mit.edu/pia/Research/deepview/exif.html.
I close the issue.
Thanks Erica!! Best regards!

from camera-image-helper.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.