• 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: Color space for cmyk eps images converting to rgb
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color space for cmyk eps images converting to rgb


  • Subject: Re: Color space for cmyk eps images converting to rgb
  • From: "Ken Ferry" <email@hidden>
  • Date: Mon, 22 Dec 2008 11:21:36 -0800

Hi Ken,

The -colorSpaceName method on NSImageRep returns only a best-effort
approximation.  This method, like many of the methods of NSImageRep,
is used by NSImage to decide which NSImageRep is the best choice for
drawing to a given destination.  The design is easiest to comprehend
from that point of view.  If an image rep doesn't have a 'home'
colorspace, calibrated RGB is the default.

EPS on Mac OS X is handled by converting the data to PDF.  The
interface NSEPSImageRep uses is documented here:
<http://developer.apple.com/documentation/GraphicsImaging/Reference/CGPSConverter/Reference/reference.html>.
 I'm not familiar with the EPS format (since we just convert it to
PDF), but a PDF doesn't have any one colorspace.  Different embedded
bitmaps may have different colorspaces.  We do not look through the
included bitmaps for a most popular colorspace or anything like that.

This is more of an explanation than a workaround.  You can and should
file a bug, but even if you can define exactly what you want to have
happen, you'll have to go it alone for now.

-Ken
Cocoa Frameworks

On Sun, Dec 21, 2008 at 10:04 PM, Ken Tozier <email@hidden> wrote:
> Hi
>
> If you open an eps image in a text editor like BBEdit, you can see clearly
> what color space it was saved as but when you create an NSImage from the
> file and call [image representations] or [image bestRepresentationForDevice:
> <printer device dict here>] all you get are images with
> "NSCalibratedRGBColorSpace." Most of our images are saved as cmyk so why is
> NSImage ignoring that info and replacing it with rgb? Is there any way to
> load eps's differently so that their saved color spaces are preserved? I
> could write a little hack to read the eps header directly and extract the
> info, but I'd like to avoid that if there is a way to do it with NSImage.
>
> Reason I ask is that I wrote a file cataloging application and one critical
> piece of info is the color space, so users will know, at a glance, whether
> an image they are about to import into a print document needs to be
> converted to cmyk.
>
> Thanks for any help
>
> _______________________________________________
>
> 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: 
 >Color space for cmyk eps images converting to rgb (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: NSCalendar/NSDate - generating all months/days in a year
  • Next by Date: Re: NSCalendar/NSDate - generating all months/days in a year
  • Previous by thread: Color space for cmyk eps images converting to rgb
  • Next by thread: Xcode Question
  • Index(es):
    • Date
    • Thread