* @return image format object
*/
public static NativeImageFormat createNativeImageFormat(Raster r)
{
NativeImageFormat fmt = new NativeImageFormat();
SampleModel sm = r.getSampleModel();
if (sm instanceof SinglePixelPackedSampleModel)
{
SinglePixelPackedSampleModel sppsm = (SinglePixelPackedSampleModel) sm;
fmt.cmmFormat = getFormatFromSPPSampleModel(sppsm, false);