% Read/Write Wireless Bitmap (level 0) Image Format %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% January 2000 %
% %
% %
-% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
% obtain a copy of the License at %
% %
-% http://www.imagemagick.org/script/license.php %
+% https://www.imagemagick.org/script/license.php %
% %
% Unless required by applicable law or agreed to in writing, software %
% distributed under the License is distributed on an "AS IS" BASIS, %
Open image file.
*/
assert(image_info != (const ImageInfo *) NULL);
- assert(image_info->signature == MagickSignature);
+ assert(image_info->signature == MagickCoreSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image_info->filename);
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickSignature);
+ assert(exception->signature == MagickCoreSignature);
image=AcquireImage(image_info,exception);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
(void) CloseBlob(image);
return(GetFirstImageInList(image));
}
+ status=SetImageExtent(image,image->columns,image->rows,exception);
+ if (status == MagickFalse)
+ return(DestroyImageList(image));
/*
Convert bi-level image to pixel packets.
*/
MagickInfo
*entry;
- entry=SetMagickInfo("WBMP");
+ entry=AcquireMagickInfo("WBMP","WBMP","Wireless Bitmap (level 0) image");
entry->decoder=(DecodeImageHandler *) ReadWBMPImage;
entry->encoder=(EncodeImageHandler *) WriteWBMPImage;
- entry->adjoin=MagickFalse;
- entry->description=ConstantString("Wireless Bitmap (level 0) image");
- entry->module=ConstantString("WBMP");
+ entry->flags^=CoderAdjoinFlag;
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
Open output image file.
*/
assert(image_info != (const ImageInfo *) NULL);
- assert(image_info->signature == MagickSignature);
+ assert(image_info->signature == MagickCoreSignature);
assert(image != (Image *) NULL);
- assert(image->signature == MagickSignature);
+ assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(exception != (ExceptionInfo *) NULL);
- assert(exception->signature == MagickSignature);
+ assert(exception->signature == MagickCoreSignature);
status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
if (status == MagickFalse)
return(status);
- if ((IssRGBColorspace(image->colorspace) == MagickFalse) &&
- (IsRGBColorspace(image->colorspace) == MagickFalse) &&
- (IsImageGray(image,exception) == MagickFalse))
- (void) TransformImageColorspace(image,sRGBColorspace,exception);
+ (void) TransformImageColorspace(image,sRGBColorspace,exception);
/*
Convert image to a bi-level image.
*/
byte=0;
for (x=0; x < (ssize_t) image->columns; x++)
{
- if (GetPixelIntensity(image,p) >= ((MagickRealType) QuantumRange/2.0))
+ if (GetPixelLuma(image,p) >= (QuantumRange/2.0))
byte|=0x1 << (7-bit);
bit++;
if (bit == 8)