Re: affine transformation of bitmap images
Re: affine transformation of bitmap images
- Subject: Re: affine transformation of bitmap images
- From: Frank Midgley <email@hidden>
- Date: Thu, 24 Feb 2005 16:29:54 -0600
On Feb 24, 2005, at 2:50PM, Sean McBride wrote:
I am just revisiting this issue. It seems that your suggestion does
not
quite work. :( I create an NSImage, lock focus on it, concat the
transform matrix, and draw. The result is 'good' in the sense that I
get
the image I want, and it displays correctly onscreen, but 'bad'
because I
am unable to get the pixels themselves.
The problem is that after drawing into the new image, I call [newImg
representations] and there is only 1 representation and it's an
NSCachedImageRep, which does not respond to -bitmapData.
Any other ideas?
Again, I have an NSBitmapImageRep and an NSAffineTransform, and I want
an
NSBitmapImageRep of the post-transformed image.
When you create the NSImage also create an NSBitmapImageRep with the
desired settings and add it to the image. Then call
-lockFocusOnRepresentation: instead of calling -lockFocus.
-Frank
------------------------------------
Frank M. Midgley
email@hidden
http://homepage.mac.com/knarf/
_______________________________________________
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