]> granicus.if.org Git - imagemagick/blobdiff - coders/jbig.c
(no commit message)
[imagemagick] / coders / jbig.c
index 1304e9bd2deaec458371ab877b6b6efe574d099c..b750c733f1618569ecdf4ed8ec4add0621af3f9e 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  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  %
@@ -40,6 +40,7 @@
   Include declarations.
 */
 #include "MagickCore/studio.h"
+#include "MagickCore/attribute.h"
 #include "MagickCore/blob.h"
 #include "MagickCore/blob-private.h"
 #include "MagickCore/cache.h"
 #include "MagickCore/memory_.h"
 #include "MagickCore/monitor.h"
 #include "MagickCore/monitor-private.h"
-#include "MagickCore/nt-feature.h"
+#include "MagickCore/nt-base-private.h"
 #include "MagickCore/pixel-accessor.h"
 #include "MagickCore/quantum-private.h"
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
+#include "MagickCore/string-private.h"
 #include "MagickCore/module.h"
 #if defined(MAGICKCORE_JBIG_DELEGATE)
 #include "jbig.h"
@@ -206,8 +208,8 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
   image->colormap[1].red=QuantumRange;
   image->colormap[1].green=QuantumRange;
   image->colormap[1].blue=QuantumRange;
-  image->x_resolution=300;
-  image->y_resolution=300;
+  image->resolution.x=300;
+  image->resolution.y=300;
   if (image_info->ping != MagickFalse)
     {
       (void) CloseBlob(image);
@@ -234,7 +236,7 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
       if (bit == 8)
         bit=0;
       SetPixelIndex(image,index,q);
-      SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+      SetPixelInfoPixel(image,image->colormap+(ssize_t) index,q);
       q+=GetPixelChannels(image);
     }
     if (SyncAuthenticPixels(image,exception) == MagickFalse)
@@ -438,15 +440,15 @@ static MagickBooleanType WriteJBIGImage(const ImageInfo *image_info,
   status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
   if (status == MagickFalse)
     return(status);
-  version=InterpretLocaleValue(JBG_VERSION,(char **) NULL);
+  version=StringToDouble(JBG_VERSION,(char **) NULL);
   scene=0;
   do
   {
     /*
       Allocate pixel data.
     */
-    if (IsRGBColorspace(image->colorspace) == MagickFalse)
-      (void) TransformImageColorspace(image,RGBColorspace);
+    if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+      (void) TransformImageColorspace(image,sRGBColorspace,exception);
     number_packets=(image->columns+7)/8;
     pixels=(unsigned char *) AcquireQuantumMemory(number_packets,
       image->rows*sizeof(*pixels));