• 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
Cocoa won't draw CMYK jpeg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa won't draw CMYK jpeg


  • Subject: Cocoa won't draw CMYK jpeg
  • From: Robert Clair <email@hidden>
  • Date: Wed, 12 Sep 2007 07:24:56 -0400

I tried opening and drawing a CMYK jpeg with my Cocoa app. All I get is a large almost all black rectangle. (Some of the image is there very faintly, you can detect it using the DigitalColor Meter and moving the cursor around.)

The image is read in by

 	NSBitmapImageRep* newRep =
     		[NSBitmapImageRep imageRepWithContentsOfFile:[sheet filename]];

and adding the representation to an NSImage.

changing the code to use

NSImage* newImage = [[NSImage alloc] initWithContentsOfFile: [sheet filename]];

doesn't make any difference, nor does changing which of NSImage's drawing methods is used, or drawing it to a Transparency Layer first and then drawing the layer.

Investigating further, I then tried opening or importing the file in a bunch of other apps. Some work correctly, some not.

Works OK:

Preview, Safari, Pages '08

Black Rectangle:

Mail, TextEdit, Pages '06, Stickies

Similar variable results with various 3rd party apps.

So clearly there is a bug somewhere and just as clearly someone knows how to get around it.

Any wisdom or help greatly appreciated.

...Bob Clair

---------------------------------------------------------------------

I used two cmyk jpegs - one exported from my own app, the other created by opening a Photoshop created cmyk tiff in Preview and then saving it as a jpeg. The later is at

             http://www.elroberto.com/cocoa/cmyk_jpeg.jpg




_______________________________________________

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: Cocoa won't draw CMYK jpeg
      • From: Scott Thompson <email@hidden>
  • Prev by Date: Converting cocoa application into Mac preference pane service
  • Next by Date: Re: [ANN] RegexKit - An Objective-C Framework for Regular Expressions Using the PCRE Library
  • Previous by thread: Converting cocoa application into Mac preference pane service
  • Next by thread: Re: Cocoa won't draw CMYK jpeg
  • Index(es):
    • Date
    • Thread