Getting Image File Information

 
 
 

There are a few standalones that let you get information on image files:

Getting Image File Information

The imginfo standalone can display information about a number of image formats.

The imginfo standalone automatically detects supported image file formats, so input files do not require an extension (such as .pic) to identify their format. However, if the file on disk has an extension, you should specify it.

The imginfo standalone can display information for any file format for which their is a dynamic shared object (DSO on Linux systems) or a dynamic link library (DLL on Windows systems).

The Setup program installs these DSOs or DLLs to <install directory>/Application/bin/sil. When you type imginfo, the usage message lists the supported file formats.

To run imginfo, you must set the environment variable SI_IMAGE_PATH to point to the <install directory>/Application/bin/sil directory.

  • If SI_IMAGE_PATH is not set or empty, imginfo checks the environment variable SI_HOME.

  • If it is set, imginfo looks in SI_HOME/Application/bin/sil.

Usage

imginfo <image file>

Where <image file> is the name of an image file.

Options

-format <name>

Specifies the format of the input image file. This is required for images that do not have a signature.

Example

To display information on the portrait image file, type:

imginfo portrait

Getting Other Image File Information

The imf_info standalone displays information about all specified images, in a spreadsheet-like layout. Information includes the image width and height, number of color components, bit depth, gamma, line ordering, image type, and image format.

Activating the -p option displays additional image information including average brightness and rgb values of image pixels, as well as a multi-line histogram of color information. Each line of the histogram represents a sub-range of the luminance values between 0.00 and 1.00.

For example, the first line represents values from 0.00 to 0.0625 while the last line represents values from 0.9375 to 1.00. The numeric value in each line is the percentage of image pixels whose luminance values are within that sub-range, while the r's, g's, and b's indicate the distribution of color components among those pixels.

The imf_info standalone automatically detects supported image file formats, including mental images formats like .map, so input files do not require an extension (such as .pic) to identify their format. However, if the file on disk does have an extension, you must specify it.

Usage

imf_info [-v] <image file>

Where <image file> is the name of an image file, including the file extension. To get information about multiple images, specify their names one after the other and separated by a space.

Options

-v

Turns on the verbose mode.

-p

Prints additional color and luminance information about each image, including average brightness and rgb values of image pixels, as well as a histogram of color information. The histogram displays the distribution of pixels and color components across several sub-ranges of luminance between the values of 0.00 and 1.00.

Example

To display information on the foo and bar bitmap file, type:

imf_info foo.bmp bar.bmp

Getting Picture File Information

The infopic standalone displays information about SOFTIMAGE picture files.

For each subregion, the following information is displayed:

  • Width

  • Height

  • Aspect ratio

  • Field type (FULL_FRAME, EVEN_FIELDS, or ODD_FIELDS)

  • Number of bits, data type, and compression method for the RGB channels

  • Number of bits, data type, and compression method for the alpha channel

The infopic standalone is useful for finding the pixel ratio and to determine whether a picture is too big to display on the monitor. It is also useful for determining whether a picture corresponds to the correct format for video transfers.

Usage

infopic [ <file1> [<file2>... ]

Where <filen> is the name of a SOFTIMAGE picture file. If no extension is specified, .pic is assumed.

Example

This example shows information on the walkies1, walkies2, and walkies3 picture files.

infopic walkies1 walkies2 walkies3

Comparing Images with diffpic

The diffpic standalone displays an image whose pixels are highlighted when the corresponding pixels of the two input pictures are different.

If you use the -i option, the intensity of each displayed image pixel is equal to the difference of the intensity of the corresponding pixels of the two input pictures.

Usage

diffpic <picture 1> <picture 2> [-o <output filename>] [-i] [-a] [-d] [-r <repeat count>] 
[-s <start frame> <end frame> <step>] [-v]

Where <picture 1> is the name of the first picture and <picture 2> is the name of the second picture.

Options

-o

Saves the result in <output filename>.

-i

Displays intensity differences.

-a

Compares only the alpha channels. Both images must have alpha channel information.

-d

Does not display the images.

-r

Specifies how many times each frame should be repeated. The default is 1.

-s

Compares a sequence of frames.

-v

Turns on the verbose mode.

Example

This example compares the tweedledee and tweedledum images from frames 1 to 50 with a step of 1 (-s 1 50 1) and saves the results in the output file called tweedles (-o).

diffpic tweedledee tweedledum -o tweedles -s 1 50 1

Comparing Images with imf_diff

The imf_diff standalone compares two image files. The files are compared, and a comparison summary is printed. If an output image (outimage) is specified, a difference image with a histogram is written to the output image. The file format of this file is specified with the output file type (outtype) if present, or taken from the file name extension if not.

Usage

imf_diff [options] image1 image2 [outimage [outtype]]

Where image1 is the name of the first picture file and image2 is the name of the second picture file.

Options

-a

Ignores alpha channel differences.

-d

Displays the difference image and the histogram in a window by starting the imf_disp standalone. This works with and without an outimage on the command line.

-e

Writes an output image even if the compared input images match. Normally, the output image is written only if there are differences.

-f

Shows differences in false colors, ranging from irrelevant differences in blue to significant differences in green, red, and white.

-g gamma

Performs gamma correction with the given gamma factor.

-h

Displays a brief summary of options.

-m thresh

Sets the threshold in the range 0 - 255. Component differences less than this threshold are ignored. The default is 3. The main purpose is to discard differences introduced by dithering (mental ray's dither option).

-n

Does not add a histogram to the displayed or saved output image.

-s

Magnifies the differences so that the largest difference is white and appears at the right edge of the histogram.

-t thresh

The difference in percent that causes imf_diff to return code 1 instead of 0. The default is 1. This is useful for automated test suites.

-u

Underlays image1 under the displayed or saved difference image at 1/10th brightness. This helps to locate differences.

-v

Verbose output prints messages showing what imf_diff is doing, and a version banner.

The most common options are -d -f -u.

Note that the sampling nature of mental ray means that the true image is approximated with appropriately selected samples until the desired image quality criteria are satisfied. This approach ensures consistent quality, but it does not necessarily create images that are bit-for-bit identical if rendered under different circumstances, such as different image task sizes, image task assignments to threads or machines, different machines or different networks, or different sampling options. Typically, differences shown in blue in the color histogram are irrelevant.