Try this for transparent background ...karinchan wrote:how to make the image product transparent?
1. EDIT: /system/library/image.php
2. FIND:
Code: Select all
$background = imagecolorallocate($this->image, 255, 255, 255);
Code: Select all
if ($this->info['mime'] != 'image/jpg') {
imagecolortransparent($this->image, $background);
}
5. FIND:
Code: Select all
$new_image = 'cache/' . substr($filename, 0, strrpos($filename, '.')) . '-' . $width . 'x' . $height . '.jpg';
Code: Select all
$info = pathinfo($filename);
$extension = $info['extension'];
$new_image = 'cache/' . substr($filename, 0, strrpos($filename, '.')) . '-' . $width . 'x' . $height . '.' . $extension;
8. Ctrl+F5 on your browser.
Only png & gif files will support transparent background. jpg images will have no change.
DEMO: