• 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
NSImage and NSBitmapImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage and NSBitmapImageRep


  • Subject: NSImage and NSBitmapImageRep
  • From: Martin Beroiz <email@hidden>
  • Date: Wed, 17 Mar 2010 01:39:42 -0500

Hello everybody,

I have a question relating NSImage and NSBitmapImageRep. I have a stream of data that I want to display in a view and it's not in any standard image format. So I created an NSBitmapImageRep, then I filled the bitmapdata with the data and drew it in the view with drawInRect: method of NSBitmapImageRep. All that works perfect.
Now I want to rotate the image 90 degrees before I draw it but without changing the view's coordinate system because i need to draw other things on it. So I thought of making my bitmap rep into an NSImage.

Question is how. I read the docs but they I cannot understand exactly what is the relation between an NSImage and NSBitmapImageRep.
From the docs:

"Image representations are used by an NSImage object to manage image data."

"If you are creating images dynamically, you are responsible for creating the image representation objects you need for your image."

I don't see how you'd "hook" an image with a bitmap rep or vice-versa.
The only relevant method of NSImage I found is  drawRepresentation:inRect: but the docs say that I shouldn't call this method directly.

So how would you guys do this?

Thanks
Martin.

_______________________________________________

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

  • Follow-Ups:
    • Re: NSImage and NSBitmapImageRep
      • From: Ken Ferry <email@hidden>
    • Re: NSImage and NSBitmapImageRep
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Blocked Reads
  • Next by Date: Re: NSImage and NSBitmapImageRep
  • Previous by thread: RESOLVED: Blocked Reads
  • Next by thread: Re: NSImage and NSBitmapImageRep
  • Index(es):
    • Date
    • Thread