• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBitmapImageRep orientation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBitmapImageRep orientation?


  • Subject: Re: NSBitmapImageRep orientation?
  • From: "Ken Ferry" <email@hidden>
  • Date: Fri, 12 Dec 2008 14:20:17 -0800

Hi Jean-Nicolas,

Could you send me one of these auto-rotated images?  NSBitmapImageRep
does not do any automatic orientation correction in 10.5.  Is it
possible that your Canon camera is writing out an already-rotated file
in orientation 1?

If ImageIO is doing automatic orientation correction for certain RAW
formats (which would be news to me), then it should report 1 for the
orientation, since it's already been handled.

-Ken
Cocoa Frameworks

On Fri, Dec 12, 2008 at 1:55 PM, Jean-Nicolas Jolivet
<email@hidden> wrote:
> I'm re-sizing some NSBitmapImage reps (mostly JPGs or RAW, both full-size
> images straight from a digital camera)...
>
> I'm working almost exclusively with NSBitmapImageRep (using
> [NSGraphicsContext graphicsContextWithBitmapImageRep:]  when drawing etc..)
>
> With some images( the ones I took with my Canon camera) the orientation is
> automatically handled (i.e. Portrait images are rotated automatically)
> without me doing anything! I'm just re-sizing them and they get rotated
> automatically!
>
> With other images (JPGs and NEF images that I took with my Nikon cam), it
> doesn't happen...
>
> Now I was wondering, how am I supposed to deal with this inconsistent
> behavior? Especially if I want to rotate my pictures automatically when I
> re-draw them...
>
> I'm able to get the Image orientation using a CGImageSourceRef and the
> kCGImagePropertyOrientation property.. and that property seems to give a
> correct value with all the images I tried... my first instinct was to use
> this property and rotate the picture if needed (i.e. if the orientation is
> != 1... rotate accordingly)... but it definitely wouldn't work with my Canon
> pictures, which somehow get rotated automatically without me having to do
> anything... (i.e. if I read the kCGImagePropertyOrientation and see that
> it's not equal to 1, I rotate the picture... which has already been rotated
> automatically... so I end up with an image that has been rotated
> twice...)....
>
> Is there any reliable way I can rotate my images to the correct orientation
> ??
>
> Jean-Nicolas Jolivet
> email@hidden
> http://www.silverscripting.com
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSBitmapImageRep orientation? (From: Jean-Nicolas Jolivet <email@hidden>)

  • Prev by Date: Re: - [NSBitmapImageRep tiffRepresentation] malloc error
  • Next by Date: Re: - [NSBitmapImageRep tiffRepresentation] malloc error
  • Previous by thread: NSBitmapImageRep orientation?
  • Next by thread: Re: NSBitmapImageRep orientation?
  • Index(es):
    • Date
    • Thread