Why am I getting the error with CFIMAGE

Participant ,
Jan 16, 2009 Jan 16, 2009

Copy link to clipboard

Copied

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!

Views

1.2K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 16, 2009 Jan 16, 2009

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 16, 2009 Jan 16, 2009

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 06, 2015 Oct 06, 2015

Copy link to clipboard

Copied

LATEST

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines