Image Module Maker

Image Module Maker (IMM) is both a Python library and a command line utility.

The IMM library facilitates converting image files into strings and embedding them in Python source code files that can be utilized by graphical applications.

The IMM command line utility uses the IMM library to manage processing a directory of images and creating a Python module containing the directory’s embedded images.

The Image Module Maker is licenced as free software under the ISC license.

Full documentation is available as part of the project as well as online at ReadTheDocs.

Dependencies

  1. Pillow the friendly fork of the Python Imaging Library (PIL) is used to process image files
  2. Python 3.3 or better

Features

  • Converts image files into strings suitable for embedding in Python source code files
  • Generates Python source code module containing embedded image data
  • Ships with a command line utility for processing a directory of image files
  • Optionally will generate code for a small Tk app, execute the app, and graphically show what the embedded images look like and allows image selection to emit image meta-data

Image Formats Supported

In general, if an image file format is supported by Pillow (the Python 3.x fork of the Python Imaging Library), then IMM supports it; however, the only image file formats tested by the author are:

png, gif, jpg, ico, tif/tiff, tga, xbm, ppm

Any limitations regarding specific file formats that PIL has, IMM will also have of course. For example, regarding the .ico format, only the largest resolution icon is loaded.