geometry=DestroyString(geometry);
break;
}
+ if (LocaleCompare(keyword,"pixel-intensity") == 0)
+ {
+ ssize_t
+ intensity;
+
+ intensity=ParseCommandOption(MagickPixelIntensityOptions,
+ MagickFalse,options);
+ if (intensity < 0)
+ break;
+ image->intensity=(PixelIntensityMethod) intensity;
+ break;
+ }
if ((LocaleNCompare(keyword,"profile:",8) == 0) ||
(LocaleNCompare(keyword,"profile-",8) == 0))
{
offset=SeekBlob(image,-((MagickOffsetType)
bzip_info.avail_in),SEEK_CUR);
if (offset < 0)
- ThrowReaderException(CorruptImageError,
- "ImproperImageHeader");
+ ThrowReaderException(CorruptImageError,"ImproperImageHeader");
}
code=BZ2_bzDecompressEnd(&bzip_info);
if (code != BZ_OK)
offset=SeekBlob(image,-((MagickOffsetType) zip_info.avail_in),
SEEK_CUR);
if (offset < 0)
- ThrowReaderException(CorruptImageError,
- "ImproperImageHeader");
+ ThrowReaderException(CorruptImageError,"ImproperImageHeader");
}
code=inflateEnd(&zip_info);
if (code != LZMA_OK)
*/
image->depth=image->depth <= 8 ? 8UL : image->depth <= 16 ? 16UL :
image->depth <= 32 ? 32UL : 64UL;
- if (IsImageGray(image,exception) != MagickFalse)
- (void) SetImageColorspace(image,GRAYColorspace,exception);
image->depth=image->depth <= 8 ? 8UL : image->depth <= 16 ? 16UL :
image->depth <= 32 ? 32UL : 64UL;
quantum_info=AcquireQuantumInfo(image_info,image);
CommandOptionToMnemonic(MagickColorspaceOptions,image->colorspace));
(void) WriteBlobString(image,buffer);
}
+ if (image->intensity != UndefinedPixelIntensityMethod)
+ {
+ (void) FormatLocaleString(buffer,MaxTextExtent,"pixel-intensity=%s\n",
+ CommandOptionToMnemonic(MagickPixelIntensityOptions,
+ image->intensity));
+ (void) WriteBlobString(image,buffer);
+ }
+ if (image->endian != UndefinedEndian)
+ {
+ (void) FormatLocaleString(buffer,MaxTextExtent,"endian=%s\n",
+ CommandOptionToMnemonic(MagickEndianOptions,image->endian));
+ (void) WriteBlobString(image,buffer);
+ }
if (compression != UndefinedCompression)
{
(void) FormatLocaleString(buffer,MaxTextExtent,"compression=%s "
geometry=DestroyString(geometry);
break;
}
+ if (LocaleCompare(keyword,"pixel-intensity") == 0)
+ {
+ ssize_t
+ intensity;
+
+ intensity=ParseCommandOption(MagickPixelIntensityOptions,
+ MagickFalse,options);
+ if (intensity < 0)
+ break;
+ image->intensity=(PixelIntensityMethod) intensity;
+ break;
+ }
if ((LocaleNCompare(keyword,"profile:",8) == 0) ||
(LocaleNCompare(keyword,"profile-",8) == 0))
{
*/
depth=GetImageQuantumDepth(image,MagickTrue);
if ((image->storage_class == PseudoClass) &&
- (image->colors > (one << depth)))
- image->storage_class=DirectClass;
+ (image->colors > (size_t) (GetQuantumRange(image->depth)+1)))
+ (void) SetImageStorageClass(image,DirectClass);
(void) WriteBlobString(image,"id=MagickCache\n");
(void) FormatLocaleString(buffer,MaxTextExtent,"magick-signature=%u\n",
GetMagickSignature((const StringInfo *) NULL));
CommandOptionToMnemonic(MagickColorspaceOptions,image->colorspace));
(void) WriteBlobString(image,buffer);
}
+ if (image->intensity != UndefinedPixelIntensityMethod)
+ {
+ (void) FormatLocaleString(buffer,MaxTextExtent,"pixel-intensity=%s\n",
+ CommandOptionToMnemonic(MagickPixelIntensityOptions,
+ image->intensity));
+ (void) WriteBlobString(image,buffer);
+ }
if (image->endian != UndefinedEndian)
{
(void) FormatLocaleString(buffer,MaxTextExtent,"endian=%s\n",