WriteBlobShort(Image *,const unsigned short),
WriteBlobLSBLong(Image *,const unsigned int),
WriteBlobLSBShort(Image *,const unsigned short),
+ WriteBlobLSBSignedLong(Image *,const signed int),
+ WriteBlobLSBSignedShort(Image *,const signed short),
WriteBlobMSBLong(Image *,const unsigned int),
WriteBlobMSBLongLong(Image *,const MagickSizeType),
WriteBlobMSBShort(Image *,const unsigned short),
% %
% %
% %
++ W r i t e B l o b L S B S i g n e d L o n g %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% WriteBlobLSBSignedLong() writes a signed value as a 32-bit quantity in
+% least-significant byte first order.
+%
+% The format of the WriteBlobLSBSignedLong method is:
+%
+% ssize_t WriteBlobLSBSignedLong(Image *image,const signed int value)
+%
+% A description of each parameter follows.
+%
+% o image: the image.
+%
+% o value: Specifies the value to write.
+%
+*/
+MagickExport ssize_t WriteBlobLSBSignedLong(Image *image,const signed int value)
+{
+ union
+ {
+ unsigned int
+ unsigned_value;
+
+ signed int
+ signed_value;
+ } quantum;
+
+ unsigned char
+ buffer[4];
+
+ assert(image != (Image *) NULL);
+ assert(image->signature == MagickCoreSignature);
+ quantum.signed_value=value;
+ buffer[0]=(unsigned char) quantum.unsigned_value;
+ buffer[1]=(unsigned char) (quantum.unsigned_value >> 8);
+ buffer[2]=(unsigned char) (quantum.unsigned_value >> 16);
+ buffer[3]=(unsigned char) (quantum.unsigned_value >> 24);
+ return(WriteBlobStream(image,4,buffer));
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
++ W r i t e B l o b L S B S i g n e d S h o r t %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% WriteBlobLSBSignedShort() writes a signed short value as a 16-bit quantity
+% in least-significant byte first order.
+%
+% The format of the WriteBlobLSBSignedShort method is:
+%
+% ssize_t WriteBlobLSBSignedShort(Image *image,const signed short value)
+%
+% A description of each parameter follows.
+%
+% o image: the image.
+%
+% o value: Specifies the value to write.
+%
+*/
+MagickExport ssize_t WriteBlobLSBSignedShort(Image *image,
+ const signed short value)
+{
+ union
+ {
+ unsigned short
+ unsigned_value;
+
+ signed short
+ signed_value;
+ } quantum;
+
+ unsigned char
+ buffer[2];
+
+ assert(image != (Image *) NULL);
+ assert(image->signature == MagickCoreSignature);
+ quantum.signed_value=value;
+ buffer[0]=(unsigned char) quantum.unsigned_value;
+ buffer[1]=(unsigned char) (quantum.unsigned_value >> 8);
+ return(WriteBlobStream(image,2,buffer));
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+ W r i t e B l o b M S B L o n g %
% %
% %
Write 12-byte version 2 bitmap header.
*/
(void) WriteBlobLSBLong(image,bmp_info.size);
- (void) WriteBlobLSBShort(image,(unsigned short) bmp_info.width);
- (void) WriteBlobLSBShort(image,(unsigned short) bmp_info.height);
+ (void) WriteBlobLSBSignedShort(image,bmp_info.width);
+ (void) WriteBlobLSBSignedShort(image,bmp_info.height);
(void) WriteBlobLSBShort(image,bmp_info.planes);
(void) WriteBlobLSBShort(image,bmp_info.bits_per_pixel);
}
Write 40-byte version 3+ bitmap header.
*/
(void) WriteBlobLSBLong(image,bmp_info.size);
- (void) WriteBlobLSBLong(image,(unsigned int) bmp_info.width);
- (void) WriteBlobLSBLong(image,(unsigned int) bmp_info.height);
+ (void) WriteBlobLSBSignedLong(image,bmp_info.width);
+ (void) WriteBlobLSBSignedLong(image,bmp_info.height);
(void) WriteBlobLSBShort(image,bmp_info.planes);
(void) WriteBlobLSBShort(image,bmp_info.bits_per_pixel);
(void) WriteBlobLSBLong(image,bmp_info.compression);
# Check additional headers
-for ac_header in arm/limits.h arpa/inet.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h sys/ipc.h sys/mman.h sys/resource.h sys/sendfile.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h wchar.h xlocale.h
+for ac_header in arm/limits.h arpa/inet.h complex.h errno.h fcntl.h limits.h linux/unistd.h locale.h machine/param.h mach-o/dyld.h netinet/in.h OS.h process.h sun_prefetch.h stdarg.h sys/ipc.h sys/mman.h sys/resource.h sys/sendfile.h sys/socket.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/wait.h utime.h wchar.h xlocale.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"