You are here: JPEG 2000 Images > Creating Multiband JPEG 2000 Files

Creating Multiband JPEG 2000 Files

The GeoExpress color compositor allows multibanded JPEG 2000 images to be created from files representing individual bands. (For MrSID encoding, use the -redband, -greenband, and -blueband switches to create RGB color composites.) Note: Color composites are single images and should not be confused with composite mosaics.

Since multiband color composites contain an arbitrary number of bands, the input files must be specified with a specially formatted text file. The text file is a comma-delimited list of files and band numbers. Each line is in the following format:

<full path of file name>,<1-based band number>

Input files must be singleband grayscale images that share the same dimensions, resolution, bit depth, and geographic positioning. Empty bands can be specified by leaving the file name blank, followed by the desired band number. The total number of bands in the color composite image is determined by the band with the highest band number. Bands do not need to be listed in numerical order.

Following is an example text file for a multiband color composite:

c:\temp\file1.tif,3
c:\temp\file2.tif,1
,6
c:\temp\file3.tif,5

This creates a six-banded image, since the highest band number is the empty band in line 3. Bands 2, 4, and 6 are empty, and bands 1, 3, and 5 are "file2.tif", "file1.tif", and "file3.tif" respectively.

The command line switch for creating a multiband color composite is -colorcomp/-ccmp. Specify the input file using the -input switch. The -inputformat switch can be used to force all of the files in the text file to be opened as a specific type. A sample command line for creating a multiband color composite would be:

mrsidgeoencoder -i infile.txt -colorcomp -o outfile.jp2 -of jp2

If you specify MrSID as an output format, you must also supply a target color space, since MrSID doesn't support multispectral imagery. For example:

mrsidgeoencoder -i infile.txt -colorcomp -o outfile.sid -of mg3 -targetrgb 3 1 5

This would take the example text file and create an RGB image using bands 3, 1, and 5.