tracker issue : CF-3126141

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

imageMakeColorTransparent() color list

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 02/29/2012

Components: CFIMAGE

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Public Beta / 281694

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Current syntax for imageMakeColorTransparent() is: imageMakeColorTransparent(img, color)

Currently "color" parameter takes a single color value. This ER is to allow the color parameter to take multiple values (specifically as a list, per Ray Camden's suggestion).

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

Watson Bug ID:	3126141

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments:

Related thread: http://prerelease.adobe.com/r/?2146318b0b814cdf91a07d99624c51e0
Comment by External U.
20489 | February 29, 2012 02:21:07 AM GMT
Verified this is fixed in CF10 Final (build 10,282462). One issue: It fails when colors are specified as a list of three 0-255 numbers. The imageNew, imageSetBackgroundColor, and imageSetDrawingColor functions all accept "r,g,b" (list of three 0-255 numbers) for the color parameter. The imageMakeColorTransparent doc says it supports the same, but doesn’t. Repro: <cfscript> myImage = imageNew("", 200, 200, "argb", "70,130,180"); imageSetDrawingColor(myImage, "240,128,128"); imageDrawOval(myImage, 40 ,50, 80, 40, true); myImage = imageMakeColorTransparent(myImage, "240,128,128"); </cfscript> <cfimage action="writeToBrowser" source="#myImage#" /> Exception: coldfusion.image.Image$InvalidImageArgumentException: The passed color argument is not in the required format. The color attribute recognizes the following colors directly: black, white, gray, mediumgray, darkgray, red, blue, green, pink, orange, magenta, yellow and cyan. You must enter any other color in RGB or hex Format. This means imageMakeColorTransparent() cannot be used when color is a list of three 0-255 numbers. Adobe, if a color function is to accept multiple colors, then it should accept them as an array. Thanks, -Aaron
Comment by External U.
20490 | May 28, 2012 03:52:37 PM GMT
*bump* The color attribute still needs to accept an array, b/c each of the colors could be in this format "r,g,b". Thus, that becomes problematic when trying to specify a list of colors in "r,g,b" format. Thanks!, -Aaron
Comment by External U.
20491 | October 20, 2015 05:09:24 PM GMT