Whenever a user uploads a photo using my script, WideImage converts it to JPEG. However, I just noticed that if I upload a PNG picture, with a transparent background, it makes it black instead.
Is there any way to make this white instead?
This is how i save the image:
$img->resizeDown('500', null)->saveToFile('annonce_billeder/'.$bnavn.'.jpeg', 70);
Edit
I looked through the API and I don’t see anything for setting the BG color on resizeDown or changing the alpha channel on the PNG before resizeDown… I do however, think that you can use the merge method to merge the PNG with a white background image. Take a look at the API for that function, essentially the PNG image would be the “watermark”.
http://wideimage.sourceforge.net/wp-content/current/doc/WideImage/WideImage_Image.html#methodmerge
Posting some code might help… you might be able to use this method
$white = $image->allocateColor(255, 255, 255);