Get Image Resolution

Overview

This movie script will attempt to determine the format and resolution of a graphic file, by directly reading the header.

Quick Links

Requirements

How this script works

  • Using the BinaryIO Xtra, the script checks known locations in a the file which correspond to different image file types. If it reads a matching header, it assumes it has determined the file type. It does NOT determine file type by the file name or extension
  • Once the type has been matched, it seeks data from a known location for that file type and determines the width and height of the image.

The script currently only reads and determines .BMP, .GIF and .TGA files. The script is meant as an example to demonstrate the process, and can easily be modified to read any type of graphic image file.