I am using PHPThumb to resize images rumtime. It is working fine but it add black background on PNG image. How could I resolve this? my path is
phpThumb/phpThumb.php?src={imagepath}&w=95&h=92
I am using PHPThumb to resize images rumtime. It is working fine but it add black background on PNG image. How could I resolve this? my path is
phpThumb/phpThumb.php?src={imagepath}&w=95&h=92
Here is the example to avoid black background:
src="/uploads/phpThumb.php?src=images/expressionengine_logo.png&w=100&f=png"
src="/uploads/phpThumb.php?src=images/expressionengine_logo.png&w=100&bg=D4E9F7"
Try replacing ImageCreateFromJPEG($file) with ImageCreateFromPNG($file)
Most probably this is the common error for the black background in the resized pngimage
Well, I am not familiar with PHPThumb
but you can use SimpleImage library with this update.
I am using it and didnt faced any problems yet. This library has purposefully updated for the problem you are facing right now. Go to the links and try to use it.