• 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
Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage


  • Subject: Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage
  • From: Abhijit Apte <email@hidden>
  • Date: Mon, 10 Sep 2012 13:01:52 +0530

Hi,



I have been running into a problem wherein I need to grayscale all the
NSImageRep objects within a NSImage (i.e. say NSImage contains two
representations for testimg.png and email@hidden).

CGImageRef which has a one-to-one correspondence with one image
representation. With CGImageRef, the conversion to grayscale is
straight-forward.



I can pick out NSImageRep objects of NSImage and then use [NSImageRep
CGImageForProposedRect:context:hints:] method to extract CGImageRef. I can
do grayscale conversion on each of these CGImageRefs, however I cannot put
these back into a single NSImage.


Is there a way to do this without converting to CGImageRef? How do we
handle multiple representations when applying grayscale?



Regards

-Abhijit
_______________________________________________

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: Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage
      • From: Kyle Sluder <email@hidden>
    • Re: Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Targeting actions/methods on selected object in NSObjectController
  • Next by Date: Re: Getting local IP of Wi-Fi device
  • Previous by thread: Re: Targeting actions/methods on selected object in NSObjectController
  • Next by thread: Re: Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage
  • Index(es):
    • Date
    • Thread