CMS MADE SIMPLE FORGE

CGSmartImage

 

[#11605] filter_resize transparent png no-upscaling issue

avatar
Created By: Chris Taylor (chrisbt)
Date Submitted: Thu Oct 12 10:53:14 -0400 2017

Assigned To: Robert Campbell (calguy1000)
Version: 1.22
CMSMS Version: 2.2.3.1
Severity: Minor
Resolution: Fixed
State: Open
Summary:
filter_resize transparent png no-upscaling issue
Detailed Description:
When filter_resize is used with a width greater than the width of the supplied
image, but with the no upscaling option set, and a transparent png supplied the
resulting image has either white or black where the transparency should be.
e.g. filter_resize='w,1000,0' but image supplied is 900x500px, semi-transparent
png
resulting image is size correctly (900x500), but with either white or
black instead of transparent

Worked as expected (i.e. with transparency) until v 1.21.5, but all versions
since cause the above issue. (1.21.8, 1.21.9, 1.21.12, 1.22)

If upscaling is allowed, resulting image is as expected. Transparent background.

Found a workaround of just using 'max_width' (not sure why I didn't use it in
the first place!)


History

Comments
avatar
Date: 2017-10-12 11:43
Posted By: Chris Taylor (chrisbt)

Also noticed that the generated img tag contains an attribute dest_file that
contains the full server path

dest_file="/home/hostingaccountname/public_html/subdomain/uploads/_CGSmartImage/img-8150507612b3c19b1eabf75f3512b3bf.png"

Not sure if this is related to the issue above or not
      
avatar
Date: 2017-10-17 07:23
Posted By: Chris Taylor (chrisbt)

Just playing with some other filters and noticed that filter_resizetofit now
does allow upscaling
      
avatar
Date: 2018-11-03 10:38
Posted By: Robert Campbell (calguy1000)

Fixed in svn
      
Updates

Updated: 2018-11-03 10:38
resolution_id: => 7