ColdFusion IsImageFile error for jpg file

2 jpg images that look exactly the same (bad image above, no.jpg, resaved as yes.png), but one is not an image according to the IsImageFile function.

Run this code

#IsImageFile("http://fdiapp.com/ini/cms/file_uploads/yes.jpg")#
**
#IsImageFile("http://fdiapp.com/ini/cms/file_uploads/no.jpg")#
+5
source share
1 answer

I think the problem is that it is CMYKjpeg. ColdFusion 9 uses ImageIOinternally, afaik only supports RGB . (Although some of the java suggestions in this thread work from ColdFusion - the colors in the resulting image are distorted.) It is likely that it happens that the ImageIOimage file cannot be loaded, and that is why it IsImageFilereturns “no”.

FWIW, IsImageFile "" ColdFusion 10. CMYK. , , ...

, - ImageMagick , ColdFusion .

+3

All Articles