Welcome Guest, Not a member yet? Register   Sign In
Image resize adding transparency to .pngs?
#1

[eluser]Unknown[/eluser]
I'm uploading an image and then creating 125px and 600px versions. Works great except when a .png file is uploaded - any areas of white in the .png are automatically converted to transparent (even though the original .png file has NO areas of transparency).

I don't see anywhere in the options/preferences to turn the transparency off. Any suggestions?

Code:
$imgpref['new_image']='./images/gallery600/'.$imgid.$imgdata['upload_data']['file_ext'];
if($data['orig_w'] < '600')
{    $imgpref['width'] = $data['orig_w'];    }
else
{    $imgpref['width']='600';    }

if($data['orig_h'] < '600')
{    $imgpref['height'] = $data['orig_h'];    }
else
{    $imgpref['height'] = '600';    }

$imgpref['create_thumb']=FALSE;
$this->image_lib->initialize($imgpref);

if(!$this->image_lib->resize())
{    $error = $this->image_lib->display_errors();    }
#2

[eluser]Unknown[/eluser]
So does no one have any suggestions or ideas as to what is causing this? Is there a preference setting that I'm missing? Has anyone else experienced this?




Theme © iAndrew 2016 - Forum software by © MyBB