• 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: NSImage get / set Pixels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImage get / set Pixels


  • Subject: Re: NSImage get / set Pixels
  • From: glenn andreas <email@hidden>
  • Date: Thu, 16 Mar 2006 09:13:31 -0600


On Mar 16, 2006, at 8:57 AM, goessly wrote:

I'd like to copy a pixel to an NSImage *outputImage (at the NSPoint *targetCoordinates).
The pixel is to be read from another NSImage *inputImage (at the NSPoint *sourceCoordinates).


Something like
[outputImage drawAt: targetCoordinates copiedPixelFrom: [inputImage pixelAt: sourceCoordinates] ]


How can I accomplish this? NSImage seems to lack getters / setters for pixels at given coordinates.

NSImages don't always have pixels (or can have more than one set of them). NSImages are a collection of NSImageReps, allowing for different representation to be used at different resolutions/image depth/profile. You want to look at the individual image representations that make up an NSImage, but even then, there may not be pixels - consider a PDF image, for example.


NSBitmapImageRep, however, have things like get/setPixel.


Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! Widgetarium | the quickest path to widgets

_______________________________________________
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: 
 >NSImage get / set Pixels (From: goessly <email@hidden>)

  • Prev by Date: NSImage get / set Pixels
  • Next by Date: Re: fetch request with compound predicate doesn't sort properly
  • Previous by thread: NSImage get / set Pixels
  • Next by thread: Re: NSImage get / set Pixels
  • Index(es):
    • Date
    • Thread