[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(); }