The Graphic size class allows the Width, Height and, (in most cases), the colour depth of a graphic file to be read.

The original class was created by David Crowell, (,, although these contacts are no longer active.

The file formats it can detect are:-

.BMP, .JPG, .GIF, .TIF, .PNG, .ICO[1], .PCX, .PSD, .PSB, .TGA[2] and the Adobe group [3], .EPS, .PS and .AI

The class has the following Method and Properties,


ReadImageInfo, which reads the image information.


ImageType, which gives one of the following as the Image type code.

Width,The image width in pixels.

Height,The image height in pixels.

Depth,The colour depth in bits/pixel.

[1] As an ICON file usually contains several icons of different sizes and colour depths, no sizes can be given, so just the number of icons is reported.
[2] In fact, the class only detects TARGA v2 files as I can't find an identifier for v1 files.
[3] Due to the variety of ways that the data can be arranged, (or left out!) of an Adobe file, no attempt has been made to find the colour depth of such files.