Resize of Image when preserve_transparency = true

See all posts See thread Reply

Re: Resize of Image when preserve_transparency = true new!
by Horst, 16 years, 11 months ago
here it is

$image = new Upload($cms_image["image_dir"].$cms_image["image_name"]);
$image->preserve_transparency    = false;
$image->image_resize                     = true;
$image->image_ratio_y                    = true;
$image->image_x  = $cms_image["max_width"]; //100
$image->image_convert  = strtolower($cms_image["target_ext"]);
$image->jpeg_quality  = $cms_image["jpg_quality"]; //75
$image->file_new_name_body = $cms_image["thumb_name1"];
$image->Process($cms_image["thumb_dir"]);

where some Values comes out of my CMS, but think that they are valid - all other Variables are 'Default'Reply
Re: Resize of Image when preserve_transparency = true new!
by colin, 16 years, 11 months ago
I fixed the bug, at least on my development version. There is a bug in the code which converts palette images to true color.

Before I can release the new version, as a quick fix, you can comment out the block of code just under the following line:
// if the image has a palette (GIF), we convert it to true color, preserving transparency
Reply