• 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
Rotating a bunch of images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rotating a bunch of images


  • Subject: Rotating a bunch of images
  • From: Dave Hersey <email@hidden>
  • Date: Mon, 31 Mar 2008 03:54:13 -0400

Hi,

I need to rotate the contents of several image files of various types and then replace the original files. I want to preserve the type of file and as much of the data as possible (for example, multiple representations). This is data processing only; I don't need to display the images while processing them.

I tried looping through the paths to create a CGImageSourceRef for each file, then for each image in the file, create a CGImageRef and use that to make a transform that rotates around the center of the image, but I wasn't sure where to go after that. It looks like I'd need to do something like concatenate that rotation transform to a context's transform, draw the original image there, create a new image with CGBitmapContextCreateImage, add that to my CGImageDestinationSourceRef and repeat for every image in the image source. But that seemed like enough steps that I thought there was probably a better approach.

What's a good way to do this?

Thanks for any suggestions.

- d

_______________________________________________

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


  • Prev by Date: Re: Modify Input in NSTableView
  • Next by Date: Re: Making a window fit its contents?
  • Previous by thread: Re: NSDictionaryController and inserting new objects.
  • Next by thread: How to programming 'drag to Application' action?
  • Index(es):
    • Date
    • Thread