Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CMYK Images Error on Resize

Explorer ,
May 15, 2009 May 15, 2009

I get the following error whenever I try to resize a CMYK image with cfimage or imageresize.

Metadata components != number of destination bands

I am running CF 8.01 with the latest hotfix applied - Cumulative Hot Fix 2 for ColdFusion 8.0.1.

I have tried several images, and I can even take an RGB jpeg that works, open it in Photoshop and save it in CMYK, then try to upload and I get the message.

<cffile action="upload" nameconflict="overwrite" destination="c:\my\dir\" filefield="filefield" />

<cfimage action="read" source="c:\my\dir\#file.serverfile#" name="sourceimage" />

<cfimage action="resize" source="#sourceimage#" destination="c:\my\production\dir\#file.serverfile#"
    height="" width="200" overwrite="yes" />

Above is one variation of code that reproduces this.  I've also tried using the ImageResize function.  I've also tried skipping the "read" step, and just doing the upload then resize.  All variations produce the above error on the resize line.

This code actually worked before the cumulative hotfix was applied.

Image attached that produces the error.

3.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 16, 2009 May 16, 2009

For some reason your attachment is showing up as  "QUEUED" so I cannot download it.  Could you try posting a link (using your server or a public server like imageshack.us)?


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 18, 2009 May 18, 2009

Here are two images to test this with...

1. RGB JPG - This works - http://www.hamilton.edu/devms/AppleiPod-MA980LL-A.jpg

2. CMYK JPG - ERROR - http://www.hamilton.edu/devms/CMYKAppleiPod-MA980LL-A.jpg

I should also note that sometimes it times out rather than displaying the error.  I've also tried updating the JVM, which did not help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 18, 2009 May 18, 2009

CF 8.0.1 with hot fix 2 I don't get an error but:

- it's very slow (110 seconds response time);

- the generated image has it's colors inverted and I fixed it in

Photoshop with Invert.

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 18, 2009 May 18, 2009

I do not receive an error.  But as mentioned by the previous responder, it was slow and the result was an image negative. The suggestions in the threads below (converting cmyk to rgb) were better in terms of speed.  However, some of the images were much lighter than the originals.  I have not seen a good solution to that issue yet.

http://stackoverflow.com/questions/22409/how-do-i-convert-images-between-cmyk-and-rgb-in-coldfusion-java
http://forums.sun.com/thread.jspa?threadID=5383115&tstart=4

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 18, 2009 May 18, 2009

I have also confirmed this behavior now.  I increased the timeout so that it would finish processed, and I now get an inverted image for almost all of my CMYK images.  There are a couple that give the other error mentioned above, but I think those are corrupt.   Also, I tried to do a imagevariable.invert() to programmatically invert the image, but it still did not come out right - colors missing.  To me, this is a significant bug in cfimage.  The documentation clearly states that CMYK images can be converted.  I will attempt to file with Adobe.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 18, 2009 May 18, 2009

tSpark wrote:

The documentation clearly states that CMYK images can be converted.  I will attempt to file with Adobe.

Technicially, it does not support "converting".  But I agree it does say read, resize, and write are supported.


The cfimage tag supports reading and writing CMYK images, but does not support actions that require converting the images. For example, you can use CMYK images with the read, write, writeToBrowser, resize, rotate, and info actions. You cannot use CMYK images with the convert, captcha, and border actions. The same rule applies to image functions.

It sounds like a bug, either in the documentation or behavior.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 18, 2009 May 18, 2009

Sorry, my mistake, I meant to say 'resizing'. I read the same section

you did. I did file a bug report on this. If I get a bug or issue

number back from Adobe, I will post it here for future reference.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 18, 2009 May 18, 2009
LATEST

Yes, please do.

If I come across any fixes for the rgb work-around, in the threads above, I will post them as well.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources