Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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)?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Yes, please do.
If I come across any fixes for the rgb work-around, in the threads above, I will post them as well.