Problem with converting colorspace

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
PCPete

Problem with converting colorspace

Post by PCPete »

I have some various file types that upload upload, need to be converted to the type they are not. So if a customer uploads a CMYK image, we save it to our server and create an RGB for web preview, else we create a CMYK image for print (to account for color shift etc).

When I run my convert -colorspace command, it works, but the resulting output is far from ideal. The image that is created is always "squished" with a large black band on the right hand side of the image where the image would normally be. The colors are also grossly off, almost inverted and with some scan lines or something like it in the image. I tried stripping profiles, can anyone tell me what is happening? So far it's always with a convert from RGB to CMYK.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem with converting colorspace

Post by magick »

For a proper colorspace conversion, apply color profiles. Here's one example:
  • convert image.jpg -profile sRGB.icm -profile USWebCoatedSWOP.icc cmyk.jpg
PCPete

Re: Problem with converting colorspace

Post by PCPete »

Yes you are correct, I found the proper way yesterday, I am just unsure why my original code generated such odd output. My modfied code produced the results I was looking for, I was lacking the the use of my swop file as the profile.
Post Reply