• 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: affine transformation of bitmap images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: affine transformation of bitmap images
      • From: "Sean McBride" <email@hidden>
References: 
 >Re: affine transformation of bitmap images (From: Ricky Sharp <email@hidden>)
 >Re: affine transformation of bitmap images (From: "Sean McBride" <email@hidden>)

  • Prev by Date: NSTextView - less efficient on loading from file?
  • Next by Date: Re: NSTask not using arguments?
  • Previous by thread: Re: affine transformation of bitmap images
  • Next by thread: Re: affine transformation of bitmap images
  • Index(es):
    • Date
    • Thread