Skip to main content
Known Participant
January 1, 2010
Question

Cfimage and jpeg issue

  • January 1, 2010
  • 1 reply
  • 6816 views

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"?

Error Message:

An exception occurred while trying to read the
image.

Unsupported Image Type

Stack Trace
at
cfempcp_prod_add_action2ecfm1551070444.runPage(C:\Inetpub\wwwroot\lifet\Admin\empcp_prod_add_action.cfm:151)

coldfusion.image.ImageReader$ImageReadingException: An exception occurred while trying to read the image.     at
coldfusion.image.ImageReader.readJPEGImage(ImageReader.java:173)
     at
coldfusion.image.ImageReader.readImage(ImageReader.java:96)
     at
coldfusion.image.Image.<init>(Image.java:226)
     at
coldfusion.tagext.io.ImageTag.doStartTag(ImageTag.java:414)
     at
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)

    This topic has been closed for replies.

    1 reply

    itisdesign
    Inspiring
    January 2, 2010

    Hi Zero_Sequence,

    Can you please use isImage()/isImageFile() first, to ensure it is a valid CF image.

    isImage(): http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-797b.html

    isImageFile(): http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7978.html

    Thanks!,

    -Aaron Neff

    Known Participant
    January 2, 2010

    hi itisdesign,

    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..

    Known Participant
    January 3, 2010

    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?

    --

    Adam


    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....