Sometimes when you try to read an image with CFIMAGE using the filename,
it will fall over with "Invalid image format" using Coldfusion 8.0.1
The solution is easy enough, just read the image into a variable
and Coldfusion inspects the binary file contents rather than just being annoying
<cffile action = "readbinary" file="d:\inetpub\wwwroot\test.jpeg" variable="tmpBin">
<cfimage action="READ" name="tmpImage" source="#tmpBin#">
Tuesday, December 07, 2010
CFIMAGE: Invalid image format - solution
Labels:
coldfusion
7 comments:
Thanks, this was very helpful.
That hit the spot! Any ideas on what cfimage is choking on? This is a great work-around, though! Thanks!
Thanks for the hint (still occuring in CF10!), but this caused some performance problems.
Solved it like this: http://joeykrabacher.blogspot.ch/2013/02/coldfusion-invalid-image-format-solution.html
Thank you for posting, this just saved my ass.
Thank you for posting, this just saved my ass.
Yeah nice one my friend (:
Yeah. nice one my friend (:
Post a Comment