if ((bmp_info.bits_per_pixel != 1) && (bmp_info.bits_per_pixel != 4) &&
(bmp_info.bits_per_pixel != 8) && (bmp_info.bits_per_pixel != 16) &&
(bmp_info.bits_per_pixel != 24) && (bmp_info.bits_per_pixel != 32))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
if (bmp_info.bits_per_pixel < 16 &&
bmp_info.number_colors > (1U << bmp_info.bits_per_pixel))
ThrowReaderException(CorruptImageError,"UnrecognizedNumberOfColors");
if ((bmp_info.compression == 1) && (bmp_info.bits_per_pixel != 8))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
if ((bmp_info.compression == 2) && (bmp_info.bits_per_pixel != 4))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
if ((bmp_info.compression == 3) && (bmp_info.bits_per_pixel < 16))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
switch (bmp_info.compression)
{
case BI_RGB:
if ((dib_info.bits_per_pixel != 1) && (dib_info.bits_per_pixel != 4) &&
(dib_info.bits_per_pixel != 8) && (dib_info.bits_per_pixel != 16) &&
(dib_info.bits_per_pixel != 24) && (dib_info.bits_per_pixel != 32))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
if ((dib_info.bits_per_pixel < 16) &&
(dib_info.number_colors > (unsigned int) (1UL << dib_info.bits_per_pixel)))
ThrowReaderException(CorruptImageError,"UnrecognizedNumberOfColors");
if ((dib_info.compression == 1) && (dib_info.bits_per_pixel != 8))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
if ((dib_info.compression == 2) && (dib_info.bits_per_pixel != 4))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
if ((dib_info.compression == 3) && (dib_info.bits_per_pixel < 16))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
switch (dib_info.compression)
{
case BI_RGB:
if ((bits_per_pixel != 1) && (bits_per_pixel != 2) &&
(bits_per_pixel != 4) && (bits_per_pixel != 8) &&
(bits_per_pixel != 16))
- ThrowReaderException(CorruptImageError,"UnrecognizedBitsPerPixel");
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
version=(size_t) ReadBlobByte(image);
if ((version != 0) && (version != 1) && (version != 2))
ThrowReaderException(CorruptImageError,"FileFormatVersionMismatch");
TIFFClose(tiff);
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
}
+ if (((sample_format != SAMPLEFORMAT_IEEEFP) || (bits_per_sample == 64)) &&
+ ((bits_per_sample <= 0) || (bits_per_sample > 32)))
+ {
+ TIFFClose(tiff);
+ ThrowReaderException(CorruptImageError,"UnsupportedBitsPerPixel");
+ }
if (sample_format == SAMPLEFORMAT_IEEEFP)
(void) SetImageProperty(image,"quantum:format","floating-point",
exception);
<message name="UnrecognizedAlphaChannelOption">
unrecognized alpha channel option
</message>
- <message name="UnrecognizedBitsPerPixel">
- unrecognized bits per pixel
- </message>
<message name="UnrecognizedImageCompression">
unrecognized compression
</message>
<message name="UnrecognizedNumberOfColors">
unrecognized number of colors
</message>
+ <message name="UnsupportedBitsPerPixel">
+ unsupported bits per pixel
+ </message>
</error>
<fatalerror>
<message name="UnableToPersistKey">
<message name="UnrecognizedAlphaChannelOption">
alpha de canal l'option non reconnus
</message>
- <message name="UnrecognizedBitsPerPixel">
- bits par pixel non reconnus
- </message>
<message name="UnrecognizedImageCompression">
compression non reconnue
</message>
<message name="UnrecognizedNumberOfColors">
nombre de couleurs non reconnu
</message>
+ <message name="UnsupportedBitsPerPixel">
+ bits par pixel non supporté
+ </message>
</error>
<fatalerror>
<message name="UnableToPersistKey">