Make transparent areas white converting from png to jpg
Posted: Sat Aug 25, 2012 12:43 pm
Hi there,
I set about converting an image, from a png that contains transparency around the outer edges, to a jpg file saved to disk.
So great i can simply do this and i am 99% there :
Trouble is, i don't seem to have any control over the background color of the output jpg file.
It always makes the transparent areas black... I would like white.
Is this possible to control..?
I set about converting an image, from a png that contains transparency around the outer edges, to a jpg file saved to disk.
So great i can simply do this and i am 99% there :
Code: Select all
on mouseUp
// image "mail" below contains a png with transparency
export image "mail" to myImageContent as JPEG
put specialfolderpath("desktop") & "/miniVersion.jpg" into tOutputPath
put myImageContent into URL("binfile:" & tOutputPath)
end mouseUp
It always makes the transparent areas black... I would like white.
Is this possible to control..?