in reply to Converting PNG to JPEG
Use Image::Magick for the conversion. Or of course, just use ImageMagick on the command line (mogrify -format jpeg foo.png).