There are a number of analysis features in ZEMAX which use IMA and/or BIM files to provide a description of an extended source in sequential mode. Files have been provided which describe a variety of illumination patterns, such as a circle, a square, a grid, or the letter F. However, there may be cases where a user-defined illumination source is needed, requiring the user to create their own IMA or BIM file. In many of these cases, a simple ASCII IMA file is sufficient to describe the desired illumination source. Such a file can be created with any text editor, e.g. Notepad. For cases in which the illumination source is more complicated but can be represented with a .BMP or .JPG file, the Geometric Bitmap Image Analysis feature can be used to create an RGB image of the source. However, there may remain some cases in which a source is required which cannot be described with either an ASCII IMA file or a .BMP or .JPG file. For these special cases binary IMA or BIM files are required. This article describes how such binary files may be generated using a simple C code.