]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 30 May 2010 00:18:58 +0000 (00:18 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 30 May 2010 00:18:58 +0000 (00:18 +0000)
coders/txt.c
wand/wandtest.c

index 7983477eeaae9cbcdce2289ef96d081442f39153..0b22ae82b850303a5876648582d736a1805f6018 100644 (file)
@@ -396,9 +396,14 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
     count;
 
   unsigned long
+    blue,
     depth,
+    green,
     height,
+    index,
     max_value,
+    opacity,
+    red,
     width;
 
   /*
@@ -458,21 +463,23 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
           {
             if (image->matte != MagickFalse)
               count=(ssize_t) sscanf(text,"%ld,%ld: (%lu,%lu,%lu,%lu,%lu",
-                &x_offset,&y_offset,&pixel.red,&pixel.green,&pixel.blue,
-                &pixel.index,&pixel.opacity);
+                &x_offset,&y_offset,&red,&green,&blue,&index,&opacity);
             else
               count=(ssize_t) sscanf(text,"%ld,%ld: (%lu,%lu,%lu,%lu",
-                &x_offset,&y_offset,&pixel.red,&pixel.green,&pixel.blue,
-                &pixel.index);
+                &x_offset,&y_offset,&red,&green,&blue,&index);
           }
         else
           if (image->matte != MagickFalse)
             count=(ssize_t) sscanf(text,"%ld,%ld: (%lu,%lu,%lu,%lu",
-              &x_offset,&y_offset,&pixel.red,&pixel.green,&pixel.blue,
-              &pixel.opacity);
+              &x_offset,&y_offset,&red,&green,&blue,&opacity);
           else
             count=(ssize_t) sscanf(text,"%ld,%ld: (%lu,%lu,%lu",
-              &x_offset,&y_offset,&pixel.red,&pixel.green,&pixel.blue);
+              &x_offset,&y_offset,&red,&green,&blue);
+        pixel.red=red;
+        pixel.green=green;
+        pixel.blue=blue;
+        pixel.opacity=opacity;
+        pixel.index=index;
         if (count < 5)
           continue;
         q=GetAuthenticPixels(image,x_offset,y_offset,1,1,exception);
index 5dcada7d7a11f0280edc8580327120c72905d229..2535b0b14f4566908bfcb09c0d7cc0ea5fd211dd 100644 (file)
@@ -490,7 +490,8 @@ int main(int argc,char **argv)
   MagickResetIterator(magick_wand);
   while (MagickNextImage(magick_wand) != MagickFalse)
     (void) fprintf(stdout,"index %ld scene %lu\n",(long)
-      MagickGetIteratorIndex(magick_wand),MagickGetImageScene(magick_wand));
+      MagickGetIteratorIndex(magick_wand),(unsigned long)
+      MagickGetImageScene(magick_wand));
   (void) fprintf(stdout,"Apply image processing options...\n");
   status=MagickCropImage(magick_wand,60,60,10,10);
   if (status == MagickFalse)