2 jpg images that look exactly the same (failing image above, no.jpg, resaved as yes.png) but one is not an Image according to 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")#
I think the problem is that is a CMYK
jpeg. ColdFusion 9 uses ImageIO
internally, which afaik only supports RGB. (While some of the java suggestions in that thread do work from ColdFusion - the colors in the resulting image are skewed.) What is probably happening is that ImageIO
fails to even load the image file and that is why IsImageFile
returns "no".
FWIW, IsImageFile
returns "yes" in ColdFusion 10. However, it still has issues with CMYK
. For example if you try and read the image, the final colors are all wrong ...
I think your best bet is to run it through a tool like ImageMagick and convert it to a format ColdFusion can handle properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With