I wrote a Python program to extract an image from a URL using
msgImage = MIMEImage( urllib2.urlopen(chartURL).read() ) msgRoot.attach(msgImage)
The image I get from the URL is in PNG format, but I would like to embed a JPG version in it. Is there an easy way to automatically convert PNG msgImage to JPG for small attachments?
Thank you for reading. Any help is appreciated.
source share