tracker issue : CF-4041625

select a category, or use search below
(searches all categories and all time range)
Title:

isValidImage Support for Animated Gifs

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): Mary Jo Sminkey / Mary Jo Sminkey (Mary Jo Sminkey)

Created: 08/22/2015

Components: CFIMAGE

Versions: 10.0

Failure Type: Usability Issue

Found In Build/Fixed In Build: Final /

Priority/Frequency: Minor / Some users will encounter

Locale/System: English / Win All

Vote Count: 2

Problem Description: isImageFile does not consider animated Gifs a valid image

Steps to Reproduce: Test isImageFile() with an animated gif

Actual Result: False

Expected Result: True

Any Workarounds: Cannot use any CF image functions to validate animated gifs, have to use other solutions to work around this.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4041625

External Customer Info:
External Company:  
External Customer Name: Mary
External Customer Email:  
External Test Config: My Hardware and Environment details: Any

Attachments:

  1. August 28, 2015 00:00:00: 1_2015_MWL15_sitebanner-animated.gif

Comments:

Unlike other images types that ColdFusion doesn't support, animated gifs are still widely used on the web, we have a client for instance that does simple animated gifs for their banner ads on their website. It's very annoying that ColdFusion does not support or recognize these as a valid image, so that we can validate them via upload tools, etc. such that we have to either skip such security measures, or go outside CF altogether for options. Even if it's not able to read these images into memory or do image manipulation on them, it should still recognize them as a valid image file.
Comment by External U.
6196 | August 22, 2015 11:33:29 AM GMT
Sorry, pasted in the wrong function name, this is of course referring to isImageFile()
Comment by External U.
6197 | August 22, 2015 11:35:29 AM GMT
[subscribe][subscribe][subscribe]
Vote by External U.
6206 | August 22, 2015 11:36:38 AM GMT
If you are willing to look into this, and would like one, I can provide a sample animated gif to test with.
Comment by External U.
6198 | August 22, 2015 11:42:14 AM GMT
Hi Mary, Thank you so much, providing a sample animated gif to test with would be really helpful so that we would also be testing on the image that you would be using. Thanks & Regards, Preethi
Comment by S P.
6199 | August 28, 2015 01:33:29 AM GMT
Sample image attached
Comment by External U.
6200 | August 28, 2015 10:00:29 AM GMT
+1 - Please add animated .gif support. Brownie points for .psd support (including manipulating layers).
Vote by External U.
6207 | August 29, 2015 03:55:47 AM GMT
I have used the below sample code to repro this issue, and have used both "isImageFile" and "isImage" functions. Both of these functions return 'true'. sample code: <cfset myImage=ImageNew("2015_MWL15_sitebanner-animated.gif")> <cfif IsImage("#myImage#")> <cfoutput>yes...isimage...its an img</cfoutput> <cfimage action="writeToBrowser" source="#myImage#"> </cfif> <cfif IsImageFile("2015_MWL15_sitebanner-animated.gif")> <cfoutput>yes...isimagefile...its an img</cfoutput> <cfset myImage=ImageNew("2015_MWL15_sitebanner-animated.gif")> <cfimage action="writeToBrowser" source="#myImage#"> <cfelse> <p>I'm sorry, there is no image associated </p> </cfif> Also I see the same result on CF 901,10 and 11.
Comment by S P.
6201 | September 24, 2015 01:25:16 AM GMT
Hi Preethi, I also see isImageFile() and isImage() return true. Could you try this? 1) Run the below code 2) Compare the 2 renders 3) See <img> displays an animated image (good) 4) See <cfimage> displays non-animated image <img src="2015_MWL15_sitebanner-animated.gif"> <cfimage action="writeToBrowser" source="2015_MWL15_sitebanner-animated.gif"> <cfimage> doc says animated .gif isn't supported, but.. can it be? Thanks!, -Aaron
Comment by External U.
6202 | September 26, 2015 09:26:44 PM GMT
Hi Aaron, I too have observed the behavior, where the image is rendered as a static image. Could you log a separate ER for the same. Thanks, Preethi
Comment by S P.
6203 | September 28, 2015 04:20:10 AM GMT
Yeah I've also verified that the isImage() works fine, there was some other code causing it to appear that it was failing at that step. But yeah also verified the cfimage issue, that's been a problem with animated gifs for awhile, as well as trying to do anything like resizing.
Comment by External U.
6204 | September 28, 2015 11:22:27 AM GMT
Hi Preethi, Done! Filed as CF-4065574. Thanks!, -Aaron
Comment by External U.
6205 | September 28, 2015 11:47:51 PM GMT