|
Lines 1-109
Link Here
|
| 1 |
--- app/compressedgif.cpp.orig Fri May 21 14:05:50 2004 |
|
|
| 2 |
+++ app/compressedgif.cpp Fri May 21 14:28:14 2004 |
| 3 |
@@ -63,7 +63,7 @@ |
| 4 |
if (byte_count >= 254) \ |
| 5 |
{ \ |
| 6 |
(void) WriteBlobByte(image,byte_count); \ |
| 7 |
- (void) WriteBlob(image,byte_count,(char *) packet); \ |
| 8 |
+ (void) WriteBlob(image,byte_count,(const unsigned char *) packet); \ |
| 9 |
byte_count=0; \ |
| 10 |
} \ |
| 11 |
datum>>=8; \ |
| 12 |
@@ -280,7 +280,7 @@ |
| 13 |
if (byte_count >= 254) |
| 14 |
{ |
| 15 |
(void) WriteBlobByte(image,byte_count); |
| 16 |
- (void) WriteBlob(image,byte_count,(char *) packet); |
| 17 |
+ (void) WriteBlob(image,byte_count,(const unsigned char *) packet); |
| 18 |
byte_count=0; |
| 19 |
} |
| 20 |
} |
| 21 |
@@ -290,7 +290,7 @@ |
| 22 |
if (byte_count > 0) |
| 23 |
{ |
| 24 |
(void) WriteBlobByte(image,byte_count); |
| 25 |
- (void) WriteBlob(image,byte_count,(char *) packet); |
| 26 |
+ (void) WriteBlob(image,byte_count,(const unsigned char *) packet); |
| 27 |
} |
| 28 |
/* |
| 29 |
Free encoder memory. |
| 30 |
@@ -359,7 +359,7 @@ |
| 31 |
assert(image->signature == MagickSignature); |
| 32 |
status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception); |
| 33 |
if (status == false) |
| 34 |
- ThrowWriterException(FileOpenError,"Unable to open file",image); |
| 35 |
+ ThrowWriterException(FileOpenError,"Unable to open file"); |
| 36 |
/* |
| 37 |
Determine image bounding box. |
| 38 |
*/ |
| 39 |
@@ -384,7 +384,7 @@ |
| 40 |
colormap=(unsigned char *) AcquireMemory(768); |
| 41 |
if ((global_colormap == (unsigned char *) NULL) || |
| 42 |
(colormap == (unsigned char *) NULL)) |
| 43 |
- ThrowWriterException(ResourceLimitError,"Memory allocation failed",image); |
| 44 |
+ ThrowWriterException(ResourceLimitError,"Memory allocation failed"); |
| 45 |
for (i=0; i < 768; i++) |
| 46 |
colormap[i]=0; |
| 47 |
/* |
| 48 |
@@ -392,12 +392,12 @@ |
| 49 |
*/ |
| 50 |
if ((GetImageAttribute(image,"comment") == (ImageAttribute *) NULL) && |
| 51 |
!image_info->adjoin && !image->matte) |
| 52 |
- (void) WriteBlob(image,6,"GIF87a"); |
| 53 |
+ (void) WriteBlob(image,6,(const unsigned char*)"GIF87a"); |
| 54 |
else |
| 55 |
if (LocaleCompare(image_info->magick,"GIF87") == 0) |
| 56 |
- (void) WriteBlob(image,6,"GIF87a"); |
| 57 |
+ (void) WriteBlob(image,6,(const unsigned char*)"GIF87a"); |
| 58 |
else |
| 59 |
- (void) WriteBlob(image,6,"GIF89a"); |
| 60 |
+ (void) WriteBlob(image,6,(const unsigned char*)"GIF89a"); |
| 61 |
page.x=image->page.x; |
| 62 |
page.y=image->page.y; |
| 63 |
if ((image->page.width != 0) && (image->page.height != 0)) |
| 64 |
@@ -437,7 +437,7 @@ |
| 65 |
LiberateMemory((void **) &global_colormap); |
| 66 |
LiberateMemory((void **) &colormap); |
| 67 |
ThrowWriterException(ResourceLimitError, |
| 68 |
- "Memory allocation failed",image) |
| 69 |
+ "Memory allocation failed") |
| 70 |
} |
| 71 |
image->colormap[opacity]=image->background_color; |
| 72 |
for (y=0; y < (long) image->rows; y++) |
| 73 |
@@ -515,7 +515,7 @@ |
| 74 |
break; |
| 75 |
(void) WriteBlobByte(image,(long) j); /* background color */ |
| 76 |
(void) WriteBlobByte(image,0x0); /* reserved */ |
| 77 |
- (void) WriteBlob(image,3*(1 << bits_per_pixel),(char *) colormap); |
| 78 |
+ (void) WriteBlob(image,3*(1 << bits_per_pixel),(const unsigned char*)colormap); |
| 79 |
for (j=0; j < 768; j++) |
| 80 |
global_colormap[j]=colormap[j]; |
| 81 |
} |
| 82 |
@@ -570,7 +570,7 @@ |
| 83 |
(void) WriteBlobByte(image,0x21); |
| 84 |
(void) WriteBlobByte(image,0xff); |
| 85 |
(void) WriteBlobByte(image,0x0b); |
| 86 |
- (void) WriteBlob(image,11,"NETSCAPE2.0"); |
| 87 |
+ (void) WriteBlob(image,11,(const unsigned char*)"NETSCAPE2.0"); |
| 88 |
(void) WriteBlobByte(image,0x03); |
| 89 |
(void) WriteBlobByte(image,0x01); |
| 90 |
(void) WriteBlobLSBShort(image,image->iterations); |
| 91 |
@@ -602,7 +602,7 @@ |
| 92 |
c|=0x80; |
| 93 |
c|=(bits_per_pixel-1); /* size of local colormap */ |
| 94 |
(void) WriteBlobByte(image,c); |
| 95 |
- (void) WriteBlob(image,3*(1 << bits_per_pixel),(char *) colormap); |
| 96 |
+ (void) WriteBlob(image,3*(1 << bits_per_pixel),(const unsigned char*) colormap); |
| 97 |
} |
| 98 |
/* |
| 99 |
Write the image data. |
| 100 |
@@ -614,8 +614,7 @@ |
| 101 |
{ |
| 102 |
LiberateMemory((void **) &global_colormap); |
| 103 |
LiberateMemory((void **) &colormap); |
| 104 |
- ThrowWriterException(ResourceLimitError,"Memory allocation failed", |
| 105 |
- image) |
| 106 |
+ ThrowWriterException(ResourceLimitError,"Memory allocation failed") |
| 107 |
} |
| 108 |
(void) WriteBlobByte(image,0x0); |
| 109 |
if (image->next == (Image *) NULL) |