JII - Java Image Info

There are a lot of possibilities to read out basic properties of image files like the width and height. Each way has its pro and cons relating to specific project requirements. JII provides a simple and clear interface to these different ways which are represented by various libraries and source codes. This significantly simplifies the validation of these methods with respect to a particular project.

The focus is on the following image types which are relevant for the web:

  • BMP
  • GIF
  • JPEG
  • PNG

Supported libraries / source codes:

  • iText: A library for pdf generation.
    There is an internal class to read out some image properties.
  • ImageInfo: A small and robust Java class by Marco Schmidt. It seems that he doesn't support this project any longer. The corresponding website hasn't been accessible for years.
  • SimpleImageInfo: A Java class by Jaimon Mathew to get the image size without loading the whole data. It's very fast.
  • Wrapper to the command line tool identify of ImageMagick: This wrapper is written by the author and analyzes the output of the tool.
  • Wrapper to Java's javax.imageio.ImageIO: A relatively slow pure JRE solution.