Skip to main content
Known Participant
January 1, 2010
Question

Cfimage and jpeg issue

  • January 1, 2010
  • 1 reply
  • 6819 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..

    Inspiring
    January 4, 2010

    Yeap...no change...

    but when i open it and save for web with photoshop the file is recognized as a picture file from coldfusion function!!!


    Hi,

    Check if this workaround can help you.

    http://www.oscararevalo.com/index.cfm/2008/1/26/CFImage-and-PJPEG-Images