1

For a whole month I've been trying to find out how to load a cmyk image (8-bit tiff) and do a UCA, UCR, GCR transformations.

I know the formulas for this transformations, but I have a problem to load an cmyk image with C++ or C#.

My plan is to manipulate the image pixel by pixel and change every value C, M, Y, K of that pixel, and finally save changed image as 8-bit tiff cmyk image. So basically I want to run through each pixel, make change to cmyk values, and save the image.

I have difficulties to find and install such a library for C# or C++, and I'm using Visual Studio Express 2010 for both.

What libraries can I use to load these images?

Mat
  • 202,337
  • 40
  • 393
  • 406
Tom
  • 21
  • 2
  • Good question. Most people working with CMYK images want to have them converted to RGB internally to work with. – Mark Ransom Sep 13 '11 at 15:11
  • @Tom: you're not supposed to ask the same question multiple times. You're supposed to edit your question to make it clearer if you don't get the answers you were expecting. Making it clearer means going to the point, with _only_ the _relevant_ context. I removed a lot of your post, but there is more that could be done to make it clearer exactly _what you need the library to provide_, and also to display the efforts you've made in your search until now, like telling about what you found but didn't fit your requirements. – Mat Sep 13 '11 at 15:13
  • Oh and @Tom, don't ever complain about downvotes or closes of your previous questions, that will _never_ help you. – Mat Sep 13 '11 at 15:14
  • Any new inputs on the subject ? – ibm123 Jun 15 '15 at 06:36

2 Answers2

2

libtiff will let you manipulate TIFF files. See also this answer on building libtiff using Visual Studio.

You'll need to read the image row by row using TIFFReadScanline to avoid conversion to RGB by the library. The open source tifftopnm utility does this; its source is here - it uses pick_cmyk_pixel to convert the data to RGB after obtaining it, but naturally you can just substitute your own logic instead.

Community
  • 1
  • 1
moonshadow
  • 86,889
  • 7
  • 82
  • 122
0

EMGU is a c# wrapper for opencv (c++) either of these will allow Tiff files to be easily used and manipulated. They will allow you to access pixels more readily and uses highly optimised code. Since these are a dedicated image processing libraries they will allow you to do more with your image without having to worry about RGB conversion or reading the file in etc.

Hope they help,

Cheers Chris

Chris
  • 3,462
  • 20
  • 32