Re: affine transformation of bitmap images
Re: affine transformation of bitmap images
- Subject: Re: affine transformation of bitmap images
- From: Ricky Sharp <email@hidden>
- Date: Wed, 16 Feb 2005 15:28:04 -0600
On Feb 16, 2005, at 3:00 PM, Sean McBride wrote:
I have a bitmap image (a jpeg) and need to translate, rotate, and scale
it. I'm not so much interested in displaying the result onscreen
(except
for debugging). I've read up on NSImage and NSAffineTransform and it
seems to me that they are geared for display onscreen. What I'd really
like is to provide an NSBitmapImageRep and a transform matrix and get
back a new NSBitmapImageRep. Will I need to draw into some kind of
offscreen graphics context to do this? or use vImage?
Just create an NSImage, lock focus on it, and draw. The transforms
will be applied to the current context which will be the NSImage. At
the end, unlock focus and then extract its representation.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden