I have a serious issue with cfimage... i trying to resize some jpegs.. most of them resizing is a sucess... but in some cases the resizing returns a
error "Unsupported Image Type" although IT IS a jpeg.. i read about CYMK or pjepg or sth like that... does anyone solved this "bug"?
An exception occurred while trying to read the
Unsupported Image Type
coldfusion.image.ImageReader$ImageReadingException: An exception occurred while trying to read the image. at
Can you please use isImage()/isImageFile() first, to ensure it is a valid CF image.
actually that is the issue.
Although it is a jpeg file isimage returns false.. the weird part this that ie does not display it right.. is shows only the X like when the pic file is missing..
Is there a work around for this problem? i tried to convert it into bmp and then back to jpeg but with no luck..
Although it is a jpeg file isimage returns false.. the weird part this that ie does not display it right.. is shows only the X like when the pic file is missing...
Hang on... so even IE doesn't think it's a JPG? Does Firefox?
What makes you think it's a JPG?
What image manipulation software are you using to convert it to/froma JPG?
<cfset isAnImageFile = false>
<cfset isAnImage = false>
<cfset isAnImageFile = true>
<cfset img = imageNew("relative_path_to_image_file")>
<cfset isAnImage = true>
<cfimage action="writeToBrowser" source="#img#">
Is an image file: <cfoutput>#isAnImageFile#</cfoutput><br>
Is an image: <cfoutput>#isAnImage#</cfoutput>
Can you open the file with an image viewer. An image viewer like IrfanView is quite tolerant. If it fails, the file is most likely corrupt or not an image file.
Yeah, i actually can view it using all kind of pic viewers(including firefox and chrome).... so i quess it is not a corrupted file.. also it has a .jpeg so i quess its a jpeg...
The weird part its that a company provided me a cd with pictures of their products.... and some of them return false in the isimage function....
Yeah, i actually can view it using all kind of pic viewers(including firefox and chrome).... so i quess it is not a corrupted file..
Well yes and no. The internal file structure of a JPG consists of a number of "frames" (not in the video sense of that word, but a data structure sense), and it's entirely likely an invalid or corrupted frame could have gotten into the mix some how, and the JPG will still be "valid" provided the frame offset info is correct. Some apps might ignore buggered-up frames, some might not.
also it has a .jpeg so i quess its a jpeg...
Well you could rename it to have a .png extension. That doesn't make it a PNG, that just means it's got the wrong file extension. ;-)
Can you attach one of these files here so I/we can test some code out on it?
Check if this workaround can help you.
1) Raise a bug with Adobe: http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html (and provide a link back to the bug here);
2) resave the files giving an error using some image-editing software, and reprocess them. I just used GIMP to resave your file, and it processed fine after that.
Well, sure, I realise that. However you seem short on options, so I think it's time you raised it with Adobe. And if you need to get moving with your project, I think the time's come to think of alternative approaches.
I dunno if it's a bug or just a shortfall either, but if other image-editing software can handle your file, there's no reason we should not expect CF to do so too. So by bringing this exceptional case to Adobe's attention, they might be able to do something about it.
One problem with my suggestion to raise it on the bug tracker is that one cannot attach files! I recommend including a link back to this thread where your attachment is.
The photo attached named SL7006-0417.jpg is of type CMYK. ColdFusion uses java to process images and java isn't able to handle the cmyk format. You must open in photoshop or some other program and save as RGB.
I have seen this issue come up a number of times and typically it is because:
Was there ever a fix for it? We have the same issue and it started all of a sudden out of the blue. Using CF 9.01 CFIMAGE seem to just stop working. We resturted the CF Server - even the box with no change
Europe, Middle East and Africa