IMG2PNG – a BMP/JPG/GIF to PNG Batch Converter
I’ve modified a Python program I found on the net to batch-convert a folder of images to PNG format and also create the bounding boxes needed by Latex – a text formatting system wonderful (once you get used to it) for large documents.
The original program JPG2PNG was from
http://www.akehrer.com/wiki/code:jpg2png
I’ve modified it to find and convert BMP & GIF images as well and so called it img2png.py
Put img2png.py in the folder full of images and run it. It will find all the JPG/BMP/GIF images and output PNG versions. I’ve tested the BMP/JPG parts, but not the GIF conversion, but (like all untested code) it should work :-)
The code should appear here but WordPress
chokes when I try to upload the Python code
so here's a download link ...
Download: img2png.py
This work is licenced under a Creative Commons Licence
Giovanni Moretti – 2007
summarised as: anything that may go wrong is not my fault!
Giovanni Moretti – 2007