• 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: Keeping grayscale image grayscale
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping grayscale image grayscale


  • Subject: Re: Keeping grayscale image grayscale
  • From: Ken Ferry <email@hidden>
  • Date: Wed, 19 Oct 2011 01:17:19 -0700

On Tue, Oct 18, 2011 at 6:26 AM, Jonathan Taylor <email@hidden>wrote:

> Belated thanks for the various replies to my question. I'm working through
> the posted code and links now and looking at what I can learn from it. One
> query though:
>
> On 12 Oct 2011, at 16:42, Heinrich Giesen wrote:
> > Another rule of thumb is: if you need -[NSImage TIFFRepresentation] you
> do something wrong.
> > (There are of course counterexamples).
>
> I've heard this said before, and have mostly eliminated it from my code.
> However the cocoadev page on NSBitmapImageRep does specifically say "A
> correct use of TIFFRepresentation is one that sends the resulting data
> outside of the process. For example, write to disk, write to pasteboard,
> write to network". So is there a particular reason why there is a problem
> with my line:
> [[destImage TIFFRepresentation] writeToFile:destFile atomically:NO];
>

No, that's a fine use of TIFFRepresentation.

NSBitmapImageRep also responds to -TIFFRepresentation, which will likely be
more convenient if you've switched to drawing in an NSBitmapImageRep.

-Ken


>
> Thanks
> Jonny_______________________________________________
>
> 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
>
_______________________________________________

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

References: 
 >Re: Keeping grayscale image grayscale (From: Heinrich Giesen <email@hidden>)
 >Re: Keeping grayscale image grayscale (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: Re: How to get key code from "SysDefined" Carbon Event
  • Next by Date: Re: Is it possible to use Radio Group(NSMatrix) in a different way?
  • Previous by thread: Re: Keeping grayscale image grayscale
  • Next by thread: Quandary : NSAppleScript ties up main thread
  • Index(es):
    • Date
    • Thread