tracker issue : CF-3177303

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

ImageNew toBase64 encoding issue with loss of quality in ColdFusion

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Glyn Jackson / Glyn Jackson (glynjackson)

Created: 04/27/2012

Components: CFIMAGE

Versions: 9.0.1

Failure Type:

Found In Build/Fixed In Build: 9.0.1 /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Web Server

Vote Count: 3

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on July 29, 2017 using build 2016.0.01.298513
Problem Description: Major issue with the automatic output/conversion code within the ImageObject to provide the binary output for the toBase64 function to encode.

Steps to Reproduce: see issue on stack: http://stackoverflow.com/questions/8050555/imagenew-tobase64-encoding-issue-with-loss-of-quality-in-coldfusion/8067729#8067729

Actual Result:

Expected Result:

Any Workarounds: My solution was to use a java add-on and everything seemed ok but for reasons I won't go into here not something I can do live.

image = createObject("java","it.sauronsoftware.base64.Base64").encode(image);
 toBinary(image );

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

Watson Bug ID:	3177303

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

Attachments:

  1. May 24, 2012 00:00:00: 1_Screen_Shot_2012-05-23_at_12.00.15_PM.png

Comments:

please see: http://stackoverflow.com/questions/8050555/imagenew-tobase64-encoding-issue-with-loss-of-quality-in-coldfusion/8067729#8067729 http://stackoverflow.com/questions/10335558/how-do-i-create-a-cf-compatible-image-from-a-java-buffered-image#comment13322489_10335558
Comment by External U.
19628 | April 27, 2012 08:13:37 AM GMT
Not happy about the loss of quality on PNG's
Vote by External U.
19637 | April 27, 2012 08:20:50 AM GMT
Yeah I get the same issue when creating an image upload function and pngs need resizing. There is loss of quality and transparent pngs look horrible i.e. colours are messed up.
Comment by External U.
19629 | April 27, 2012 08:45:38 AM GMT
Yeah I get the same issue when creating an image upload function and pngs need resizing. There is loss of quality and transparent pngs look horrible i.e. colours are messed up.
Vote by External U.
19638 | April 27, 2012 08:45:47 AM GMT
the reason for this issue is that png's are being converted to jpg so any transparent png gets tunred black there is also a loss of quality during this process too. png SHOULD not be tunred to jpg
Comment by External U.
19630 | April 27, 2012 09:40:57 AM GMT
have workaround but messy using a undocumented cf function getimagebytes not ideal as all my image are now converted to png but better than imagenew converting them to jpg imageNew("#arguments.directoryPath#\#arguments.imageName#").getimagebytes("png")
Comment by External U.
19631 | April 27, 2012 10:37:05 AM GMT
I also have this issue.
Comment by External U.
19632 | May 23, 2012 01:28:15 PM GMT
Please fix.
Comment by External U.
19633 | May 23, 2012 01:28:26 PM GMT
Please fix this issue. This fix is taking too long.
Vote by External U.
19639 | May 23, 2012 01:29:09 PM GMT
glynjackson - Re: "not ideal as all my image are now converted to png" If the image source is a physical file, just use the file apply it conditionally (ie only when it is *.png)
Comment by External U.
19634 | May 29, 2012 02:37:15 AM GMT
Fix verified and will be available in the next ColdFusion version.
Comment by S P.
19635 | June 20, 2015 03:24:02 AM GMT
Verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
19636 | July 29, 2017 11:41:22 PM GMT