]> granicus.if.org Git - imagemagick/blobdiff - coders/braille.c
(no commit message)
[imagemagick] / coders / braille.c
index 358e62592e31237779de64314a62157cbc544aff..ec930d6ed0a5b6b9ac5ec949f3d91e7ae6591f79 100644 (file)
@@ -15,7 +15,7 @@
 %                                February 2008                                %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2012 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  %
@@ -38,6 +38,7 @@
   Include declarations.
 */
 #include "MagickCore/studio.h"
+#include "MagickCore/attribute.h"
 #include "MagickCore/blob.h"
 #include "MagickCore/blob-private.h"
 #include "MagickCore/cache.h"
@@ -216,12 +217,14 @@ static MagickBooleanType WriteBRAILLEImage(const ImageInfo *image_info,
       cell_height=3;
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
   if (status == MagickFalse)
     return(status);
   if (!iso_11548_1)
     {
-      value=GetImageProperty(image,"label");
+      value=GetImageProperty(image,"label",exception);
       if (value != (const char *) NULL)
         {
           (void) FormatLocaleString(buffer,MaxTextExtent,"Title: %s\n", value);
@@ -247,14 +250,14 @@ static MagickBooleanType WriteBRAILLEImage(const ImageInfo *image_info,
       (void) WriteBlobString(image,buffer);
       (void) WriteBlobString(image,"\n");
     }
-  (void) SetImageType(image,BilevelType);
+  (void) SetImageType(image,BilevelType,exception);
   polarity = 0;
   if (image->storage_class == PseudoClass) {
-    polarity=(Quantum) (GetPixelPacketIntensity(&image->colormap[0]) >=
+    polarity=(Quantum) (GetPixelInfoIntensity(&image->colormap[0]) >=
       (Quantum) (QuantumRange/2));
     if (image->colors == 2)
-      polarity=(Quantum) (GetPixelPacketIntensity(&image->colormap[0]) >=
-        GetPixelPacketIntensity(&image->colormap[1]));
+      polarity=(Quantum) (GetPixelInfoIntensity(&image->colormap[0]) >=
+        GetPixelInfoIntensity(&image->colormap[1]));
   }
   for (y=0; y < (ssize_t) image->rows; y+=(ssize_t) cell_height)
   {