From: cristy Date: Sat, 17 Dec 2011 01:29:40 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6531 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a99dcf3776e0bd61aaf98ff01e6e9621a9156c2;p=imagemagick --- diff --git a/coders/bmp.c b/coders/bmp.c index 65cc8100d..bbc70a8a8 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -75,20 +75,33 @@ #undef BI_PNG #define BI_PNG 5 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__MINGW32__) +#undef BI_RGB #define BI_RGB 0 +#undef BI_RLE8 #define BI_RLE8 1 +#undef BI_RLE4 #define BI_RLE4 2 +#undef BI_BITFIELDS #define BI_BITFIELDS 3 +#undef LCS_CALIBRATED_RBG #define LCS_CALIBRATED_RBG 0 +#undef LCS_sRGB #define LCS_sRGB 1 +#undef LCS_WINDOWS_COLOR_SPACE #define LCS_WINDOWS_COLOR_SPACE 2 +#undef PROFILE_LINKED #define PROFILE_LINKED 3 +#undef PROFILE_EMBEDDED #define PROFILE_EMBEDDED 4 +#undef LCS_GM_BUSINESS #define LCS_GM_BUSINESS 1 /* Saturation */ +#undef LCS_GM_GRAPHICS #define LCS_GM_GRAPHICS 2 /* Relative */ +#undef LCS_GM_IMAGES #define LCS_GM_IMAGES 4 /* Perceptual */ +#undef LCS_GM_ABS_COLORIMETRIC #define LCS_GM_ABS_COLORIMETRIC 8 /* Absolute */ #endif diff --git a/coders/miff.c b/coders/miff.c index cb9b6bf73..aff7b0b61 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -413,8 +413,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, *image; int - c, - code; + c; #if defined(MAGICKCORE_LZMA_DELEGATE) lzma_stream @@ -494,7 +493,6 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, c=ReadBlobByte(image); if (c == EOF) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); - code=0; *id='\0'; (void) ResetMagickMemory(keyword,0,sizeof(keyword)); version=0.0; @@ -1258,6 +1256,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, #if defined(MAGICKCORE_BZLIB_DELEGATE) case BZipCompression: { + int + code; + (void) ResetMagickMemory(&bzip_info,0,sizeof(bzip_info)); bzip_info.bzalloc=AcquireBZIPMemory; bzip_info.bzfree=RelinquishBZIPMemory; @@ -1272,6 +1273,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, #if defined(MAGICKCORE_LZMA_DELEGATE) case LZMACompression: { + int + code; + (void) ResetMagickMemory(&allocator,0,sizeof(allocator)); allocator.alloc=AcquireLZMAMemory; allocator.free=RelinquishLZMAMemory; @@ -1287,6 +1291,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, case LZWCompression: case ZipCompression: { + int + code; + (void) ResetMagickMemory(&zip_info,0,sizeof(zip_info)); zip_info.zalloc=AcquireZIPMemory; zip_info.zfree=RelinquishZIPMemory; @@ -1353,6 +1360,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, lzma_info.avail_out=packet_size*image->columns; do { + int + code; + if (lzma_info.avail_in == 0) { lzma_info.next_in=compress_pixels; @@ -1442,6 +1452,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, #if defined(MAGICKCORE_BZLIB_DELEGATE) case BZipCompression: { + int + code; + if (version == 0) { MagickOffsetType @@ -1462,6 +1475,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, #if defined(MAGICKCORE_LZMA_DELEGATE) case LZMACompression: { + int + code; + code=lzma_code(&lzma_info,LZMA_FINISH); if ((code != LZMA_STREAM_END) && (code != LZMA_OK)) status=MagickFalse; @@ -1473,6 +1489,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, case LZWCompression: case ZipCompression: { + int + code; + if (version == 0) { MagickOffsetType @@ -1814,9 +1833,6 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, *property, *value; - int - code; - #if defined(MAGICKCORE_LZMA_DELEGATE) lzma_allocator allocator; @@ -1876,7 +1892,6 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); if (status == MagickFalse) return(status); - code=0; scene=0; do { @@ -2272,6 +2287,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, #if defined(MAGICKCORE_BZLIB_DELEGATE) case BZipCompression: { + int + code; + (void) ResetMagickMemory(&bzip_info,0,sizeof(bzip_info)); bzip_info.bzalloc=AcquireBZIPMemory; bzip_info.bzfree=RelinquishBZIPMemory; @@ -2286,6 +2304,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, #if defined(MAGICKCORE_LZMA_DELEGATE) case LZMACompression: { + int + code; + (void) ResetMagickMemory(&allocator,0,sizeof(allocator)); allocator.alloc=AcquireLZMAMemory; allocator.free=RelinquishLZMAMemory; @@ -2301,6 +2322,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, case LZWCompression: case ZipCompression: { + int + code; + (void) ResetMagickMemory(&zip_info,0,sizeof(zip_info)); zip_info.zalloc=AcquireZIPMemory; zip_info.zfree=RelinquishZIPMemory; @@ -2341,6 +2365,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, quantum_type,pixels,exception); do { + int + code; + bzip_info.next_out=(char *) compress_pixels; bzip_info.avail_out=(unsigned int) BZipMaxExtent(packet_size* image->columns); @@ -2366,6 +2393,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, quantum_type,pixels,exception); do { + int + code; + lzma_info.next_out=compress_pixels; lzma_info.avail_out=packet_size*image->columns; code=lzma_code(&lzma_info,LZMA_RUN); @@ -2391,6 +2421,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, quantum_type,pixels,exception); do { + int + code; + zip_info.next_out=compress_pixels; zip_info.avail_out=(uInt) ZipMaxExtent(packet_size*image->columns); code=deflate(&zip_info,Z_SYNC_FLUSH); @@ -2450,6 +2483,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, #if defined(MAGICKCORE_BZLIB_DELEGATE) case BZipCompression: { + int + code; + for ( ; ; ) { if (status == MagickFalse) @@ -2476,6 +2512,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, #if defined(MAGICKCORE_LZMA_DELEGATE) case LZMACompression: { + int + code; + for ( ; ; ) { if (status == MagickFalse) @@ -2500,6 +2539,9 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, case LZWCompression: case ZipCompression: { + int + code; + for ( ; ; ) { if (status == MagickFalse) diff --git a/configure b/configure index 40b95d123..5a0a83b24 100755 --- a/configure +++ b/configure @@ -23840,7 +23840,7 @@ elif test $ac_cv_sizeof_signed_long_long -eq 8; then INT64_T='signed long long' INT64_F='"ll"' fi -case "${build_os}" in +case "${host_os}" in mingw* ) INT64_F='"I64"' ;; @@ -23861,7 +23861,7 @@ elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then UINT64_T='unsigned long long' UINT64_F='"ll"' fi -case "${build_os}" in +case "${host_os}" in mingw* ) UINT64_F='"I64"' ;; diff --git a/configure.ac b/configure.ac index 258b18a51..92e176ac5 100755 --- a/configure.ac +++ b/configure.ac @@ -985,7 +985,7 @@ elif test $ac_cv_sizeof_signed_long_long -eq 8; then INT64_T='signed long long' INT64_F='"ll"' fi -case "${build_os}" in +case "${host_os}" in mingw* ) INT64_F='"I64"' ;; @@ -1004,7 +1004,7 @@ elif test $ac_cv_sizeof_unsigned_long_long -eq 8; then UINT64_T='unsigned long long' UINT64_F='"ll"' fi -case "${build_os}" in +case "${host_os}" in mingw* ) UINT64_F='"I64"' ;;