try {
final int numComponents = image.getColorModel().getNumComponents();
final int colorSpace =
LCJPEGWriter.getColorSpaceFromNumComponents( numComponents );
if ( colorSpace == CS_UNKNOWN )
throw new LCImageLibException(
"Unsupported number of components: " + numComponents
);
final LCJPEGWriter writer = new LCJPEGWriter(
options.getExportFile().getPath(),