• 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: "Sean McBride" <email@hidden>
  • Date: Fri, 25 Feb 2005 18:36:45 -0500
  • Organization: Rogue Research

On 2005-02-25 14:27, Robert Clair said:

>Did you draw the image on the screen at some point ?

Yes.

>This, at least in
>my experience,  is what makes it cache.

This seems to be what I'm seeing too.

>The ways of NSImage are
>mysterious.

Got that right! :)

>Try adding
>
>   [newImg setDataRetained: YES];

Good idea, but no luck...

>before you draw. If that doesn't do it, then
>
>[newImg lockFocus];
>NSBitmapImageRep* newBitmapRep =
>          [[NSBitmapImageRep alloc] initWithFocusedViewRect:
>              NSMakeRect( 0.0,0.0, [newImg size].width,
>                 [newImg size].height)];
>[newImg unlockFocus];
>
>will give you a bitmapRep with the pixels.

I tried that when you first suggested it, and it 'works' (I got an
NSBitmapImageRep) but it no longer draws properly, somehow the transform
is all screwed up.  It works great in the case of an identity transform.

I'd like to avoid NSImage altogether, but to be able to [bitmapRep
drawInRect:] I need to lock focus on something... but if not NSImage, what?

Thanks!

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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

References: 
 >Re: affine transformation of bitmap images (From: Robert Clair <email@hidden>)

  • Prev by Date: Re: Toolbar Item Label Refresh
  • Next by Date: Problem with exec and accentuated characters
  • Previous by thread: Re: affine transformation of bitmap images
  • Next by thread: NSPopupButton crash
  • Index(es):
    • Date
    • Thread