]> granicus.if.org Git - imagemagick/blobdiff - coders/vicar.c
(no commit message)
[imagemagick] / coders / vicar.c
index ff9916578ef29943330aa2fc7380c16243ca31f3..77ad3aaf08846358fb118d3f2f5c95e338627a7f 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2011 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  %
@@ -153,9 +153,6 @@ static Image *ReadVICARImage(const ImageInfo *image_info,
   int
     c;
 
-  ssize_t
-    y;
-
   MagickBooleanType
     status,
     value_expected;
@@ -169,12 +166,13 @@ static Image *ReadVICARImage(const ImageInfo *image_info,
   register PixelPacket
     *q;
 
-  ssize_t
-    count;
-
   size_t
     length;
 
+  ssize_t
+    count,
+    y;
+
   unsigned char
     *pixels;
 
@@ -308,7 +306,7 @@ static Image *ReadVICARImage(const ImageInfo *image_info,
     if (SyncAuthenticPixels(image,exception) == MagickFalse)
       break;
     status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y,
-                image->rows);
+      image->rows);
     if (status == MagickFalse)
       break;
   }
@@ -401,8 +399,7 @@ ModuleExport void UnregisterVICARImage(void)
 %  stacked together to form image cubes.  This method only writes a single
 %  grayscale plane.
 %
-%  WriteVICARImage was written contributed by
-%  gorelick@esther.la.asu.edu.
+%  WriteVICARImage was written contributed by gorelick@esther.la.asu.edu.
 %
 %  The format of the WriteVICARImage method is:
 %
@@ -434,12 +431,12 @@ static MagickBooleanType WriteVICARImage(const ImageInfo *image_info,
   register const PixelPacket
     *p;
 
-  ssize_t
-    count;
-
   size_t
     length;
 
+  ssize_t
+    count;
+
   unsigned char
     *pixels;
 
@@ -462,10 +459,10 @@ static MagickBooleanType WriteVICARImage(const ImageInfo *image_info,
   */
   (void) ResetMagickMemory(header,' ',MaxTextExtent);
   (void) FormatMagickString(header,MaxTextExtent,
-    "LBLSIZE=%lu FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=20000 DIM=2 EOL=0 "
-    "RECSIZE=%lu ORG='BSQ' NL=%lu NS=%lu NB=1 N1=0 N2=0 N3=0 N4=0 NBB=0 "
-    "NLB=0 TASK='ImageMagick'",(unsigned long) MaxTextExtent,(unsigned long)
-    image->columns,(unsigned long) image->rows,(unsigned long) image->columns);
+    "LBLSIZE=%.20g FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=20000 DIM=2 EOL=0 "
+    "RECSIZE=%.20g ORG='BSQ' NL=%.20g NS=%.20g NB=1 N1=0 N2=0 N3=0 N4=0 NBB=0 "
+    "NLB=0 TASK='ImageMagick'",(double) MaxTextExtent,(double) image->columns,
+    (double) image->rows,(double) image->columns);
   (void) WriteBlob(image,MaxTextExtent,(unsigned char *) header);
   /*
     Write VICAR pixels.
@@ -486,7 +483,7 @@ static MagickBooleanType WriteVICARImage(const ImageInfo *image_info,
     if (count != (ssize_t) length)
       break;
     status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
-                image->rows);
+      image->rows);
     if (status == MagickFalse)
       break;
   }