Skip to main content
Inspiring
January 16, 2009
Question

Why am I getting the error with CFIMAGE

  • January 16, 2009
  • 3 replies
  • 1628 views
We're runnig CF8 on Solaris 9. I'm uploading an image and simply reading it to the browser. Why am I getting this error message?

An exception occured while performing the writeToBrowser cfimage action.
coldfusion.image.ImageReader$UnsupportedImageFormatException: The png|jpg|jpeg|gif image format is not supported on this operating system.

The error occurred in /opt/httpd/docroot/www/oirm/das/idb/cf8present/upload/upload.cfm: line 25

Also, does anyone know about anything about coldfusion image object. The following gets assigned to any image that I upload (the number after the @ sign changes for each) coldfusion.image.Image@17f79a8

Very frustrating!
    This topic has been closed for replies.

    3 replies

    Participant
    October 7, 2015

    I know this a very old post, but I'm just adding this as a possibility for anyone else that encounters this bug;

    In my case this was simply caused by an additional space after the destination attribute value in the cfimage tag. This meant that JPG had a space after it, and one might imagine that when the end of the file is checked for an extension it did not match because of this extra character.

    Hope this helps someone.

    Inspiring
    January 17, 2009
    > Why am I getting this error message?
    > format = "png|jpg|jpeg|gif">

    I think you misinterpreted the example in livedocs. The format value should be _one_ of these: "png|jpg|jpeg", not all three. In other words, display the image in PNG format -or- JPG format.

    <cfimage
    action = "writeToBrowser"
    source = "../upload/images/lily1.jpg"
    format="png" />

    Having said that, the format argument is optional. If omitted, the image is displayed in the browser as a PNG. According to the documentation gifs are also displayed as png's, so you can probably just use png or jpg.
    January 17, 2009
    I used to get a similar error on Windows Vista 64. I add the lates hotfix for CFIMAGE and everything worked fine.

    Do you have the latest hotfix? They should sort 99% of problems like this usually.

    Mikey.