if ((image_info->type != UndefinedType) &&
(image_info->type != OptimizeType))
(void) SetImageType(image,image_info->type,exception);
- quantum_info=AcquireQuantumInfo(image_info,image);
- if (quantum_info == (QuantumInfo *) NULL)
- ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
- if ((image->storage_class != PseudoClass) && (image->depth >= 32) &&
- (quantum_info->format == UndefinedQuantumFormat) &&
- (IsHighDynamicRangeImage(image,exception) != MagickFalse))
- {
- status=SetQuantumFormat(image,quantum_info,FloatingPointQuantumFormat);
- if (status == MagickFalse)
- ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
- }
- if ((LocaleCompare(image_info->magick,"PTIF") == 0) &&
- (GetPreviousImageInList(image) != (Image *) NULL))
- (void) TIFFSetField(tiff,TIFFTAG_SUBFILETYPE,FILETYPE_REDUCEDIMAGE);
- if ((image->columns != (uint32) image->columns) ||
- (image->rows != (uint32) image->rows))
- ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
- (void) TIFFSetField(tiff,TIFFTAG_IMAGELENGTH,(uint32) image->rows);
- (void) TIFFSetField(tiff,TIFFTAG_IMAGEWIDTH,(uint32) image->columns);
compression=image->compression;
if (image_info->compression != UndefinedCompression)
compression=image_info->compression;
default:
break;
}
+ quantum_info=AcquireQuantumInfo(image_info,image);
+ if (quantum_info == (QuantumInfo *) NULL)
+ ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
+ if ((image->storage_class != PseudoClass) && (image->depth >= 32) &&
+ (quantum_info->format == UndefinedQuantumFormat) &&
+ (IsHighDynamicRangeImage(image,exception) != MagickFalse))
+ {
+ status=SetQuantumFormat(image,quantum_info,FloatingPointQuantumFormat);
+ if (status == MagickFalse)
+ ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
+ }
+ if ((LocaleCompare(image_info->magick,"PTIF") == 0) &&
+ (GetPreviousImageInList(image) != (Image *) NULL))
+ (void) TIFFSetField(tiff,TIFFTAG_SUBFILETYPE,FILETYPE_REDUCEDIMAGE);
+ if ((image->columns != (uint32) image->columns) ||
+ (image->rows != (uint32) image->rows))
+ ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit");
+ (void) TIFFSetField(tiff,TIFFTAG_IMAGELENGTH,(uint32) image->rows);
+ (void) TIFFSetField(tiff,TIFFTAG_IMAGEWIDTH,(uint32) image->columns);
if (image->colorspace == CMYKColorspace)
{
photometric=PHOTOMETRIC_SEPARATED;