• 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: Tiff conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tiff conversion


  • Subject: Re: Tiff conversion
  • From: Ivan Salina Fernandes <email@hidden>
  • Date: Sat, 11 Aug 2001 17:31:02 -0300

Dear Clyde,

Thank you for your great help. I found how to create an algorithm, and it's working fine. But now I'm having a problem getting the bytes. When the Tiff images have 300 dpi, my array goes out of memory (I'm using java). So, I have to try two kinds of solution:
1- Find a solution for de out of memory error, or;
2- Convert the images to 72 dpi (using cocoa).

Can you help me ?


Thanks again.

Ivan
email@hidden


On Monday, August 6, 2001, at 02:07 PM, Clyde McQueen wrote:

On Monday, August 6, 2001, at 06:10 AM, Ivan Salina Fernandes wrote:

I created this second image, but I don't know where I can find this standard conversion algotithm. Do you know ?

I did a quick search on Google and came up with this site; there are probably more:

http://www.scriptmeridian.org/projects/tips/cmyktorgb.html

Also, I found this warning:

http://www.pixelphoto.com/html/cmyk_and_rgb.html

This "pixel by pixel" that you talked about means byte by byte ?!

Sort of. You'll have 3 bytes per pixel in the RGB space, and 4 bytes for CMYK. They're either organized in planes (all the red together, all of the green together, and all the blue together) or meshed (a red byte, a green byte, a blue byte, and so on). You'll have to query the image to find out what you have.

When you create the CMYK image you have to decide if you want 4 planes or a single meshed plane. It probably depends on the application.

/Clyde


Thank you very much.

Ivan
email@hidden

On Friday, August 3, 2001, at 06:55 PM, Clyde McQueen wrote:

On Wednesday, August 1, 2001, at 02:33 PM, Ivan Salina Fernandes wrote:

Dear friends,
I'm trying to convert a tiff image, from CMYK (4 components) to RGB (3 components). I'm using Cocoa, but I couldn't find any kind of "way" to do this. Can anybody HELP me ?

You'll have to do it yourself. Create a 2nd NSBitmapImageRep with 3 planes using the rather hairy method:

- (id)initWithBitmapDataPlanes:(unsigned char **)planes
pixelsWide:(int)width
pixelsHigh:(int)height
bitsPerSample:(int)bps
samplesPerPixel:(int)spp
hasAlpha:(BOOL)alpha
isPlanar:(BOOL)isPlanar
colorSpaceName:(NSString *)colorSpaceName
bytesPerRow:(int)rowBytes
bitsPerPixel:(int)pixelBits

Then walk the source & destination data pixel by pixel and convert CMYK to RGB using the standard conversion algorithm.

/Clyde


  • Follow-Ups:
    • Re: Tiff conversion
      • From: Clyde McQueen <email@hidden>
  • Prev by Date: Re: NSArchiver
  • Next by Date: How to convert white color to alpha color in a gif image
  • Previous by thread: Re: Tiff conversion
  • Next by thread: Re: Tiff conversion
  • Index(es):
    • Date
    • Thread