]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 28 Oct 2011 18:33:11 +0000 (18:33 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 28 Oct 2011 18:33:11 +0000 (18:33 +0000)
58 files changed:
Magick++/Makefile.am
Magick++/lib/Image.cpp
MagickCore/Makefile.am
MagickCore/compress.c
MagickCore/configure.c
MagickCore/constitute.c
MagickCore/draw.h
MagickCore/fx.c
MagickCore/geometry.h
MagickCore/identify.c
MagickCore/image.c
MagickCore/image.h
MagickCore/mac.c
MagickCore/magick-config.h
MagickCore/profile.c
MagickCore/property.c
MagickCore/resize.c
MagickWand/Makefile.am
MagickWand/WandCore-config.1 [deleted file]
MagickWand/magick-image.c
Makefile.am
Makefile.in
PerlMagick/Magick.xs
coders/bmp.c
coders/dib.c
coders/djvu.c
coders/dps.c
coders/emf.c
coders/icon.c
coders/ipl.c
coders/jbig.c
coders/jpeg.c
coders/miff.c
coders/mpc.c
coders/msl.c
coders/mvg.c
coders/pango.c
coders/pcl.c
coders/pcx.c
coders/pdf.c
coders/pict.c
coders/png.c
coders/ps.c
coders/ps2.c
coders/ps3.c
coders/psd.c
coders/sct.c
coders/svg.c
coders/tiff.c
coders/txt.c
coders/wpg.c
coders/xcf.c
coders/xps.c
config/config.h.in
config/configure.xml
configure
configure.ac
scripts/Makefile.am

index 6ae4f5f13fd022789ac169c4fbe59cd3221c84f4..2188f2614c298d8f321a5f44ca2963bc488b47d2 100644 (file)
@@ -136,13 +136,13 @@ Magick___lib_libMagick___la_SOURCES = \
        Magick++/lib/Magick++/Thread.h \
        Magick++/lib/Magick++/TypeMetric.h
 
-magickpptopincdir = $(topincludedir)
+magickpptopincdir = $(INCLUDE_PATH)
 magickpptopinc_HEADERS = $(MAGICKPP_TOP_INCHEADERS)
 
 MAGICKPP_TOP_INCHEADERS_OPT = \
   Magick++/lib/Magick++.h
 
-magickppincdir = $(topincludedir)/Magick++
+magickppincdir = $(INCLUDE_PATH)/Magick++
 
 magickppinc_HEADERS = $(MAGICKPP_INCHEADERS)
 
index 7dcd628328bfe314664711b5bf2e47edd7120303..a9ebc5b1e193cd3bb3339ab615793d43353a28db 100644 (file)
@@ -2979,21 +2979,21 @@ void Magick::Image::density ( const Geometry &density_ )
   options()->density( density_ );
   if ( density_.isValid() )
     {
-      image()->x_resolution = density_.width();
+      image()->resolution.x = density_.width();
       if ( density_.height() != 0 )
         {
-          image()->y_resolution = density_.height();
+          image()->resolution.y = density_.height();
         }
       else
         {
-          image()->y_resolution = density_.width();
+          image()->resolution.y = density_.width();
         }
     }
   else
     {
       // Reset to default
-      image()->x_resolution = 0;
-      image()->y_resolution = 0;
+      image()->resolution.x = 0;
+      image()->resolution.y = 0;
     }
 }
 Magick::Geometry Magick::Image::density ( void ) const
@@ -3003,11 +3003,11 @@ Magick::Geometry Magick::Image::density ( void ) const
       ssize_t x_resolution=72;
       ssize_t y_resolution=72;
 
-      if (constImage()->x_resolution > 0.0)
-        x_resolution=static_cast<ssize_t>(constImage()->x_resolution + 0.5);
+      if (constImage()->resolution.x > 0.0)
+        x_resolution=static_cast<ssize_t>(constImage()->resolution.x + 0.5);
 
-      if (constImage()->y_resolution > 0.0)
-        y_resolution=static_cast<ssize_t>(constImage()->y_resolution + 0.5);
+      if (constImage()->resolution.y > 0.0)
+        y_resolution=static_cast<ssize_t>(constImage()->resolution.y + 0.5);
 
       return Geometry(x_resolution,y_resolution);
     }
@@ -4114,11 +4114,11 @@ std::string Magick::Image::x11Display ( void ) const
 
 double Magick::Image::xResolution ( void ) const
 {
-  return constImage()->x_resolution;
+  return constImage()->resolution.x;
 }
 double Magick::Image::yResolution ( void ) const
 {
-  return constImage()->y_resolution;
+  return constImage()->resolution.y;
 }
 
 // Copy Constructor
index 6af4243652c3e8ff3f73d215ba59c81fda8370c4..db0f7601f672a892efd44c83ce70494323f891e0 100644 (file)
@@ -15,7 +15,7 @@
 #  Makefile for building the MagickCore API.
 # 
 
-MagickCoreincdir = $(topincludedir)/MagickCore
+MagickCoreincdir = $(INCLUDE_PATH)/MagickCore
 
 # Headers which are installed
 MagickCoreinc_HEADERS = \
index 9badd66ac5aeec6dc937a390b831e6385424df60..39ef70c0a4941c7b9710de485132717624c1cd09 100644 (file)
@@ -505,8 +505,8 @@ MagickExport MagickBooleanType HuffmanDecodeImage(Image *image,
   while (runlength < 11)
    InputBit(bit);
   do { InputBit(bit); } while ((int) bit == 0);
-  image->x_resolution=204.0;
-  image->y_resolution=196.0;
+  image->resolution.x=204.0;
+  image->resolution.y=196.0;
   image->units=PixelsPerInchResolution;
   image_view=AcquireCacheView(image);
   for (y=0; ((y < (ssize_t) image->rows) && (null_lines < 3)); )
index 3971eae1271bda93dccb6f58f16204b715d9e999..3e2cfda11ae7b0b31695f518df8b77f2adf6f1b8 100644 (file)
@@ -676,10 +676,6 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
   (void) AppendValueToLinkedList(paths,ConstantString(
     MAGICKCORE_CONFIGURE_PATH));
 #endif
-#if defined(MAGICKCORE_CONFIGDIR_ARCH)
-  (void) AppendValueToLinkedList(paths,ConstantString(
-    MAGICKCORE_CONFIGDIR_ARCH));
-#endif
 #if defined(MAGICKCORE_DOCUMENTATION_PATH)
   (void) AppendValueToLinkedList(paths,ConstantString(
     MAGICKCORE_DOCUMENTATION_PATH));
index 5a692d3dcc8990cf11307432c5f9edf0c9dd1882..11050ed330a03524940cbd044d4ed4ea8be32a76 100644 (file)
@@ -659,21 +659,21 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
     value=GetImageProperty(next,"exif:XResolution",exception);
     if (value != (char *) NULL)
       {
-        geometry_info.rho=next->x_resolution;
+        geometry_info.rho=next->resolution.x;
         geometry_info.sigma=1.0;
         flags=ParseGeometry(value,&geometry_info);
         if (geometry_info.sigma != 0)
-          next->x_resolution=geometry_info.rho/geometry_info.sigma;
+          next->resolution.x=geometry_info.rho/geometry_info.sigma;
         (void) DeleteImageProperty(next,"exif:XResolution");
       }
     value=GetImageProperty(next,"exif:YResolution",exception);
     if (value != (char *) NULL)
       {
-        geometry_info.rho=next->y_resolution;
+        geometry_info.rho=next->resolution.y;
         geometry_info.sigma=1.0;
         flags=ParseGeometry(value,&geometry_info);
         if (geometry_info.sigma != 0)
-          next->y_resolution=geometry_info.rho/geometry_info.sigma;
+          next->resolution.y=geometry_info.rho/geometry_info.sigma;
         (void) DeleteImageProperty(next,"exif:YResolution");
       }
     value=GetImageProperty(next,"tiff:ResolutionUnit",exception);
index cb16cec2470deac06caa6451336dd8847d1c7278..e331327b2511d09650f032237ad2c3f5f853ea3f 100644 (file)
@@ -134,13 +134,6 @@ typedef enum
   RepeatSpread
 } SpreadMethod;
 
-typedef struct _PointInfo
-{ 
-  double
-    x,
-    y;
-} PointInfo;
-
 typedef struct _StopInfo
 {
   PixelInfo
index 2ee6b51783e695e36189e3cc16e5d6df6fa9ef9b..17dc2f93f59407decd8edd56da5b3a58f78f5d0f 100644 (file)
@@ -1756,9 +1756,9 @@ static MagickRealType FxGetSymbol(FxInfo *fx_info,const PixelChannel channel,
           (LocaleCompare(symbol,"image.standard_deviation") == 0))
         return(FxChannelStatistics(fx_info,image,channel,symbol+6,exception));
       if (LocaleCompare(symbol,"image.resolution.x") == 0)
-        return(image->x_resolution);
+        return(image->resolution.x);
       if (LocaleCompare(symbol,"image.resolution.y") == 0)
-        return(image->y_resolution);
+        return(image->resolution.y);
       if (LocaleCompare(symbol,"intensity") == 0)
         return(QuantumScale*GetPixelInfoIntensity(&pixel));
       if (LocaleCompare(symbol,"i") == 0)
@@ -1840,9 +1840,9 @@ static MagickRealType FxGetSymbol(FxInfo *fx_info,const PixelChannel channel,
     case 'r':
     {
       if (LocaleCompare(symbol,"resolution.x") == 0)
-        return(image->x_resolution);
+        return(image->resolution.x);
       if (LocaleCompare(symbol,"resolution.y") == 0)
-        return(image->y_resolution);
+        return(image->resolution.y);
       if (LocaleCompare(symbol,"r") == 0)
         return(QuantumScale*pixel.red);
       break;
index 9fa8f3b4bbc0634c9f589dab458b660e2c457a50..d6b13af310c0d8f4fdf6951ef6db682e3c5204ce 100644 (file)
@@ -117,6 +117,13 @@ typedef struct _OffsetInfo
     y;
 } OffsetInfo;
 
+typedef struct _PointInfo
+{
+  double
+    x,
+    y;
+} PointInfo;
+
 typedef struct _RectangleInfo
 {
   size_t
index d6d7501d8d740e8d62277b06e7da180eb8bc5e95..10ca5a2a9d8047e3372c2a60d95e4938244dfd5a 100644 (file)
@@ -393,13 +393,13 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
         (image->magick_rows != image->rows))
       (void) FormatLocaleFile(file,"  Base geometry: %.20gx%.20g\n",(double)
         image->magick_columns,(double) image->magick_rows);
-  if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
+  if ((image->resolution.x != 0.0) && (image->resolution.y != 0.0))
     {
-      (void) FormatLocaleFile(file,"  Resolution: %gx%g\n",image->x_resolution,
-        image->y_resolution);
+      (void) FormatLocaleFile(file,"  Resolution: %gx%g\n",image->resolution.x,
+        image->resolution.y);
       (void) FormatLocaleFile(file,"  Print size: %gx%g\n",(double)
-        image->columns/image->x_resolution,(double) image->rows/
-        image->y_resolution);
+        image->columns/image->resolution.x,(double) image->rows/
+        image->resolution.y);
     }
   (void) FormatLocaleFile(file,"  Units: %s\n",CommandOptionToMnemonic(
     MagickResolutionOptions,(ssize_t) image->units));
index 0e25f8a283872147c73b06bceceec370df3ae965..41abdc7ec245b155ef5f6436ddfe67701c24f8c5 100644 (file)
@@ -185,8 +185,8 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info,
     exception);
   (void) QueryColorCompliance(TransparentColor,AllCompliance,
     &image->transparent_color,exception);
-  image->x_resolution=DefaultResolution;
-  image->y_resolution=DefaultResolution;
+  image->resolution.x=DefaultResolution;
+  image->resolution.y=DefaultResolution;
   image->units=PixelsPerInchResolution;
   GetTimerInfo(&image->timer);
   image->ping=MagickFalse;
@@ -242,10 +242,10 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info,
         geometry_info;
 
       flags=ParseGeometry(image_info->density,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
   if (image_info->page != (char *) NULL)
     {
@@ -4167,10 +4167,10 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
         geometry_info;
 
       flags=ParseGeometry(option,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
   option=GetImageOption(image_info,"depth");
   if (option != (const char *) NULL)
@@ -4286,8 +4286,8 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
           {
             if (units == PixelsPerCentimeterResolution)
               {
-                image->x_resolution/=2.54;
-                image->y_resolution/=2.54;
+                image->resolution.x/=2.54;
+                image->resolution.y/=2.54;
               }
             break;
           }
@@ -4295,10 +4295,10 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
           {
             if (units == PixelsPerInchResolution)
               {
-                image->x_resolution=(double) ((size_t) (100.0*2.54*
-                  image->x_resolution+0.5))/100.0;
-                image->y_resolution=(double) ((size_t) (100.0*2.54*
-                  image->y_resolution+0.5))/100.0;
+                image->resolution.x=(double) ((size_t) (100.0*2.54*
+                  image->resolution.x+0.5))/100.0;
+                image->resolution.y=(double) ((size_t) (100.0*2.54*
+                  image->resolution.y+0.5))/100.0;
               }
             break;
           }
index 6e6ecaee50a001e628a01b16d80559914deb0c77..c3296b045ed6d38f90fd9075ea6b699ab81124eb 100644 (file)
@@ -201,9 +201,8 @@ struct _Image
   ssize_t
     offset;
 
-  double
-    x_resolution,   /* image resolution/density */
-    y_resolution;
+  PointInfo
+    resolution;     /* image resolution/density */
 
   RectangleInfo
     page,           /* virtual canvas size and offset of image */
index 0e5ee36d91116263d33e5786e2d43940c76c02d1..9dbea8698e73c0bb4769838ef02f9648dbfc76ed 100644 (file)
@@ -1299,8 +1299,8 @@ MagickExport Image *ReadPICTImage(const ImageInfo *image_info,
       break;
     }
   }
-  image->x_resolution=(picture_info.hRes) >> 16;
-  image->y_resolution=(picture_info.vRes) >> 16;
+  image->resolution.x=(picture_info.hRes) >> 16;
+  image->resolution.y=(picture_info.vRes) >> 16;
   image->units=PixelsPerInchResolution;
   image->columns=picture_info.sourceRect.right-picture_info.sourceRect.left;
   image->rows=picture_info.sourceRect.bottom-picture_info.sourceRect.top;
index 46a194b7716b95f14a5f9cf9e1ba12e2fea6fc50..2eb6a0f65c303226a95a27c9269cfae4a5c654f7 100644 (file)
 #define MAGICKCORE_CODER_RELATIVE_PATH "ImageMagick-7.0.0/modules-Q16/coders"
 #endif
 
-/* ARCH specific config directory */
-#ifndef MAGICKCORE_CONFIGDIR_ARCH
-#define MAGICKCORE_CONFIGDIR_ARCH "/usr/local/lib/ImageMagick-7.0.0"
-#endif
-
 /* Directory where architecture-dependent configuration files live. */
 #ifndef MAGICKCORE_CONFIGURE_PATH
 #define MAGICKCORE_CONFIGURE_PATH "/usr/local/etc/ImageMagick/"
 /* Define if you have umem memory allocation library */
 /* #undef HasUMEM */
 
-/* ARCH specific include directory */
-#ifndef MAGICKCORE_INCLUDEDIR_ARCH
-#define MAGICKCORE_INCLUDEDIR_ARCH "/usr/local/include"
+/* Directory where ImageMagick headers live. */
+#ifndef MAGICKCORE_INCLUDE_PATH
+#define MAGICKCORE_INCLUDE_PATH "/usr/local/include/ImageMagick/"
 #endif
 
 /* ImageMagick is formally installed under prefix */
index e3c2e7c56a7ae26b4f3f3275754d8b71ad22e4cb..c3f92f36cd26fc792e02a60adfc2794db1d983e0 100644 (file)
@@ -6360,9 +6360,9 @@ static MagickBooleanType GetProfilesFromResourceBlock(Image *image,
           Resolution.
         */
         p=ReadResourceShort(p,&resolution)+6;
-        image->x_resolution=(double) resolution;
+        image->resolution.x=(double) resolution;
         p=ReadResourceShort(p,&resolution)+6;
-        image->y_resolution=(double) resolution;
+        image->resolution.y=(double) resolution;
         break;
       }
       case 0x0404:
@@ -6719,14 +6719,14 @@ MagickPrivate MagickBooleanType SyncImageProfiles(Image *image)
         case 0x011a:
         {
           (void) WriteProfileLong(endian,(size_t)
-            (image->x_resolution+0.5),p);
+            (image->resolution.x+0.5),p);
           (void) WriteProfileLong(endian,1UL,p+4);
           break;
         }
         case 0x011b:
         {
           (void) WriteProfileLong(endian,(size_t)
-            (image->y_resolution+0.5),p);
+            (image->resolution.y+0.5),p);
           (void) WriteProfileLong(endian,1UL,p+4);
           break;
         }
index 2e54e20ddc25879d9a21dfda9d44ae225e822532..42159a04c8635271ed0580ecca7ff7543c3a3af5 100644 (file)
@@ -138,8 +138,8 @@ MagickExport MagickBooleanType CloneImageProperties(Image *image,
   image->directory=(char *) NULL;
   (void) CloneString(&image->geometry,clone_image->geometry);
   image->offset=clone_image->offset;
-  image->x_resolution=clone_image->x_resolution;
-  image->y_resolution=clone_image->y_resolution;
+  image->resolution.x=clone_image->resolution.x;
+  image->resolution.y=clone_image->resolution.y;
   image->page=clone_image->page;
   image->tile_offset=clone_image->tile_offset;
   image->extract_info=clone_image->extract_info;
@@ -2453,7 +2453,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
       if (LocaleNCompare("xresolution",property,11) == 0)
         {
           (void) FormatLocaleString(value,MaxTextExtent,"%g",
-            image->x_resolution);
+            image->resolution.x);
           break;
         }
       break;
@@ -2463,7 +2463,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
       if (LocaleNCompare("yresolution",property,11) == 0)
         {
           (void) FormatLocaleString(value,MaxTextExtent,"%g",
-            image->y_resolution);
+            image->resolution.y);
           break;
         }
       break;
@@ -2920,14 +2920,14 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
       }
       case 'x': /* Image horizontal resolution (density).  */
       {
-        q+=FormatLocaleString(q,extent,"%g %s",image->x_resolution,
+        q+=FormatLocaleString(q,extent,"%g %s",image->resolution.x,
           CommandOptionToMnemonic(MagickResolutionOptions,(ssize_t)
             image->units));
         break;
       }
       case 'y': /* Image vertical resolution (density)  */
       {
-        q+=FormatLocaleString(q,extent,"%g %s",image->y_resolution,
+        q+=FormatLocaleString(q,extent,"%g %s",image->resolution.y,
           CommandOptionToMnemonic(MagickResolutionOptions,(ssize_t)
           image->units));
         break;
@@ -3283,10 +3283,10 @@ MagickExport MagickBooleanType SetImageProperty(Image *image,
             geometry_info;
 
           flags=ParseGeometry(value,&geometry_info);
-          image->x_resolution=geometry_info.rho;
-          image->y_resolution=geometry_info.sigma;
+          image->resolution.x=geometry_info.rho;
+          image->resolution.y=geometry_info.sigma;
           if ((flags & SigmaValue) == 0)
-            image->y_resolution=image->x_resolution;
+            image->resolution.y=image->resolution.x;
         }
       if (LocaleCompare(property,"depth") == 0)
         {
index 34bd0167969a578654a420f188119bc94f96d89f..d243ed9643dfb793956b604ea949c5493d0bf4ed 100644 (file)
@@ -1941,15 +1941,15 @@ MagickExport Image *ResampleImage(const Image *image,const double x_resolution,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
-  width=(size_t) (x_resolution*image->columns/(image->x_resolution == 0.0 ?
-    72.0 : image->x_resolution)+0.5);
-  height=(size_t) (y_resolution*image->rows/(image->y_resolution == 0.0 ?
-    72.0 : image->y_resolution)+0.5);
+  width=(size_t) (x_resolution*image->columns/(image->resolution.x == 0.0 ?
+    72.0 : image->resolution.x)+0.5);
+  height=(size_t) (y_resolution*image->rows/(image->resolution.y == 0.0 ?
+    72.0 : image->resolution.y)+0.5);
   resample_image=ResizeImage(image,width,height,filter,blur,exception);
   if (resample_image != (Image *) NULL)
     {
-      resample_image->x_resolution=x_resolution;
-      resample_image->y_resolution=y_resolution;
+      resample_image->resolution.x=x_resolution;
+      resample_image->resolution.y=y_resolution;
     }
   return(resample_image);
 }
index 8a00f407c2b04a4394e8523386746181841f9a2b..875a392d30be7634cf7b7b5fc52be6ac69225fca 100644 (file)
@@ -15,7 +15,7 @@
 #  Makefile for building MagickWand API.
 #
 
-MagickWandincdir = $(topincludedir)/MagickWand
+MagickWandincdir = $(INCLUDE_PATH)/MagickWand
 
 MAGICKWAND_SOURCES = \
        MagickWand/MagickWand.h \
diff --git a/MagickWand/WandCore-config.1 b/MagickWand/WandCore-config.1
deleted file mode 100644 (file)
index de8caaa..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-.ad l
-.nh
-.TH Wand-Config 1 "2 May 2002" "Wand"
-.SH NAME
-Wand-config \- get information about the installed version of the Magick Wand
-.SH SYNOPSIS
-.B Wand-config 
-.B [--cflags]
-.B [--cppflags]
-.B [--exec-prefix]
-.B [--ldflags]
-.B [--libs]
-.B [--prefix]
-.B [--version]
-.SH DESCRIPTION
-.B Wand-config
-prints the compiler and linker flags required to compile and link programs
-that use the
-.BR Wand
-Application Programmer Interface.
-.SH EXAMPLES
-To print the version of the installed distribution of
-.BR Wand ,
-use:
-
-.nf
-  Wand-config --version
-.fi
-  
-To compile a program that calls the 
-.BR Wand
-Application Programmer Interface, use:
-
-.nf
-  cc `Wand-config --cflags --cppflags --ldflags --libs` program.c
-.fi
-
-.SH OPTIONS
-.TP
-.B --cflags
-Print the compiler flags that were used to compile 
-.BR libWand .
-.TP
-.B --cppflags
-Print the preprocessor flags that are needed to find the
-.B Wand
-C include files and defines to ensure that the Wand data structures match between
-your program and the installed libraries.
-.TP
-.B --exec-prefix
-Print the directory under which target specific binaries and executables are installed.
-.TP
-.B --ldflags
-Print the linker flags that are needed to link with the
-.B Wand
-library.
-.TP
-.B --libs
-Print the linker flags that are needed to link a program with
-.BR libWand .
-.TP
-.B --version
-Print the version of the
-.B Wand
-distribution to standard output.
-.SH COPYRIGHT
-See http://www.imagemagick.org/script/license.php
-.SH AUTHORS
-John Cristy, ImageMagick Studio LLC
index 2786d50fb7cd124d4c0e6e0b4729b68528c1fec9..cd35b00c7257810fa96dd87cb062b9553b9ab172 100644 (file)
@@ -5236,8 +5236,8 @@ WandExport MagickBooleanType MagickGetImageResolution(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  *x=wand->images->x_resolution;
-  *y=wand->images->y_resolution;
+  *x=wand->images->resolution.x;
+  *y=wand->images->resolution.y;
   return(MagickTrue);
 }
 \f
@@ -9897,8 +9897,8 @@ WandExport MagickBooleanType MagickSetImageResolution(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  wand->images->x_resolution=x_resolution;
-  wand->images->y_resolution=y_resolution;
+  wand->images->resolution.x=x_resolution;
+  wand->images->resolution.y=y_resolution;
   return(MagickTrue);
 }
 \f
index 4a0a17d71163bf42027435636bf751332e646281..ecfd75a98388e4d819788010a7815e04c3f7aa09 100644 (file)
@@ -17,8 +17,6 @@
 #  Top-Level Makefile for building ImageMagick.
 #
 
-topincludedir = @includedir@/ImageMagick
-
 AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
 
 ACLOCAL_AMFLAGS = -I m4
index 1847b2eef9498a4b2e0e96e331fcbc5411727a15..6ea36bd5f7e9629f5599941143bf3641f68c8ab4 100644 (file)
@@ -2386,6 +2386,7 @@ ILBMEncodeDelegate = @ILBMEncodeDelegate@
 INCLTDL = @INCLTDL@
 INCLUDEDIR_ARCH = @INCLUDEDIR_ARCH@
 INCLUDE_DIR = @INCLUDE_DIR@
+INCLUDE_PATH = @INCLUDE_PATH@
 INFO_DIR = @INFO_DIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -2657,7 +2658,6 @@ top_srcdir = @top_srcdir@
 type_include_files = @type_include_files@
 windows_font_dir = @windows_font_dir@
 xml2_config = @xml2_config@
-topincludedir = @includedir@/ImageMagick
 
 # -I$(srcdir) is needed for user that built libltdl with a sub-Automake
 # (not as a sub-package!) using 'nostdinc':
@@ -3849,7 +3849,7 @@ coders_yuv_la_SOURCES = coders/yuv.c
 coders_yuv_la_CPPFLAGS = $(MODULE_EXTRA_CPPFLAGS)
 coders_yuv_la_LDFLAGS = $(MODULECOMMONFLAGS)
 coders_yuv_la_LIBADD = $(MAGICKCORE_LIBS)
-MagickCoreincdir = $(topincludedir)/MagickCore
+MagickCoreincdir = $(INCLUDE_PATH)/MagickCore
 
 # Headers which are installed
 MagickCoreinc_HEADERS = \
@@ -4274,7 +4274,7 @@ MAGICKCORE_INSTALL_DATA_LOCAL_TARGETS = MagickCore-install-data-local
 
 # Uninstall magick-config.h
 MAGICKCORE_UNINSTALL_LOCAL_TARGETS = MagickCore-uninstall-local
-MagickWandincdir = $(topincludedir)/MagickWand
+MagickWandincdir = $(INCLUDE_PATH)/MagickWand
 MAGICKWAND_SOURCES = \
        MagickWand/MagickWand.h \
        MagickWand/animate.c \
@@ -4530,12 +4530,12 @@ Magick___lib_libMagick___la_SOURCES = \
        Magick++/lib/Magick++/Thread.h \
        Magick++/lib/Magick++/TypeMetric.h
 
-magickpptopincdir = $(topincludedir)
+magickpptopincdir = $(INCLUDE_PATH)
 magickpptopinc_HEADERS = $(MAGICKPP_TOP_INCHEADERS)
 MAGICKPP_TOP_INCHEADERS_OPT = \
   Magick++/lib/Magick++.h
 
-magickppincdir = $(topincludedir)/Magick++
+magickppincdir = $(INCLUDE_PATH)/Magick++
 magickppinc_HEADERS = $(MAGICKPP_INCHEADERS)
 MAGICKPP_INCHEADERS_OPT = \
        Magick++/lib/Magick++/Blob.h \
index d4ff707dbb8026a247a7c9f70dc39781c4024e40..ecc723dbbd12900d05f04bbc49fcce7f3587bd96 100644 (file)
@@ -1357,10 +1357,10 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
           for ( ; image; image=image->next)
           {
             flags=ParseGeometry(SvPV(sval,na),&geometry_info);
-            image->x_resolution=geometry_info.rho;
-            image->y_resolution=geometry_info.sigma;
+            image->resolution.x=geometry_info.rho;
+            image->resolution.y=geometry_info.sigma;
             if ((flags & SigmaValue) == 0)
-              image->y_resolution=image->x_resolution;
+              image->resolution.y=image->resolution.x;
           }
           break;
         }
@@ -2125,8 +2125,8 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
                 {
                   if (units == PixelsPerCentimeterResolution)
                     {
-                      image->x_resolution*=2.54;
-                      image->y_resolution*=2.54;
+                      image->resolution.x*=2.54;
+                      image->resolution.y*=2.54;
                     }
                   break;
                 }
@@ -2134,8 +2134,8 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
                 {
                   if (units == PixelsPerInchResolution)
                     {
-                      image->x_resolution/=2.54;
-                      image->y_resolution/=2.54;
+                      image->resolution.x/=2.54;
+                      image->resolution.y/=2.54;
                     }
                   break;
                 }
@@ -4552,7 +4552,7 @@ Get(ref,...)
               if (image == (Image *) NULL)
                 break;
               (void) FormatLocaleString(geometry,MaxTextExtent,"%.15gx%.15g",
-                image->x_resolution,image->y_resolution);
+                image->resolution.x,image->resolution.y);
               s=newSVpv(geometry,0);
               PUSHs(s ? sv_2mortal(s) : &sv_undef);
               continue;
@@ -5411,7 +5411,7 @@ Get(ref,...)
           if (LocaleCompare(attribute,"x-resolution") == 0)
             {
               if (image != (Image *) NULL)
-                s=newSVnv(image->x_resolution);
+                s=newSVnv(image->resolution.x);
               PUSHs(s ? sv_2mortal(s) : &sv_undef);
               continue;
             }
@@ -5425,7 +5425,7 @@ Get(ref,...)
           if (LocaleCompare(attribute,"y-resolution") == 0)
             {
               if (image != (Image *) NULL)
-                s=newSVnv(image->y_resolution);
+                s=newSVnv(image->resolution.y);
               PUSHs(s ? sv_2mortal(s) : &sv_undef);
               continue;
             }
@@ -9650,16 +9650,16 @@ Mogrify(ref,...)
           if (attribute_flag[5] != 0)
             argument_list[5].real_reference=1.0;
           width=(size_t) (geometry_info.rho*image->columns/
-            (image->x_resolution == 0.0 ? 72.0 : image->x_resolution)+0.5);
+            (image->resolution.x == 0.0 ? 72.0 : image->resolution.x)+0.5);
           height=(size_t) (geometry_info.sigma*image->rows/
-            (image->y_resolution == 0.0 ? 72.0 : image->y_resolution)+0.5);
+            (image->resolution.y == 0.0 ? 72.0 : image->resolution.y)+0.5);
           image=ResizeImage(image,width,height,(FilterTypes)
             argument_list[3].integer_reference,argument_list[5].real_reference,
             exception);
           if (image != (Image *) NULL)
             {
-              image->x_resolution=geometry_info.rho;
-              image->y_resolution=geometry_info.sigma;
+              image->resolution.x=geometry_info.rho;
+              image->resolution.y=geometry_info.sigma;
             }
           break;
         }
index 509738c5a7537f29383c33f4f4b49d6372bf5e83..65cc8100d4613f2b24ff0a33e3101e2ba2abac90 100644 (file)
@@ -929,8 +929,8 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
     /*
       Initialize image structure.
     */
-    image->x_resolution=(double) bmp_info.x_pixels/100.0;
-    image->y_resolution=(double) bmp_info.y_pixels/100.0;
+    image->resolution.x=(double) bmp_info.x_pixels/100.0;
+    image->resolution.y=(double) bmp_info.y_pixels/100.0;
     image->units=PixelsPerCentimeterResolution;
     /*
       Convert BMP raster image to pixel packets.
@@ -1611,14 +1611,14 @@ static MagickBooleanType WriteBMPImage(const ImageInfo *image_info,Image *image,
       case UndefinedResolution:
       case PixelsPerInchResolution:
       {
-        bmp_info.x_pixels=(unsigned int) (100.0*image->x_resolution/2.54);
-        bmp_info.y_pixels=(unsigned int) (100.0*image->y_resolution/2.54);
+        bmp_info.x_pixels=(unsigned int) (100.0*image->resolution.x/2.54);
+        bmp_info.y_pixels=(unsigned int) (100.0*image->resolution.y/2.54);
         break;
       }
       case PixelsPerCentimeterResolution:
       {
-        bmp_info.x_pixels=(unsigned int) (100.0*image->x_resolution);
-        bmp_info.y_pixels=(unsigned int) (100.0*image->y_resolution);
+        bmp_info.x_pixels=(unsigned int) (100.0*image->resolution.x);
+        bmp_info.y_pixels=(unsigned int) (100.0*image->resolution.y);
         break;
       }
     }
index 9c6ca4cf97fdd60e8f8ba6d018a837f8a38f5e03..55bbe678d89b31113421bec5b523404473bc467b 100644 (file)
@@ -632,8 +632,8 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
     Initialize image structure.
   */
   image->units=PixelsPerCentimeterResolution;
-  image->x_resolution=(double) dib_info.x_pixels/100.0;
-  image->y_resolution=(double) dib_info.y_pixels/100.0;
+  image->resolution.x=(double) dib_info.x_pixels/100.0;
+  image->resolution.y=(double) dib_info.y_pixels/100.0;
   /*
     Convert DIB raster image to pixel packets.
   */
@@ -1048,14 +1048,14 @@ static MagickBooleanType WriteDIBImage(const ImageInfo *image_info,Image *image,
     case UndefinedResolution:
     case PixelsPerInchResolution:
     {
-      dib_info.x_pixels=(size_t) (100.0*image->x_resolution/2.54);
-      dib_info.y_pixels=(size_t) (100.0*image->y_resolution/2.54);
+      dib_info.x_pixels=(size_t) (100.0*image->resolution.x/2.54);
+      dib_info.y_pixels=(size_t) (100.0*image->resolution.y/2.54);
       break;
     }
     case PixelsPerCentimeterResolution:
     {
-      dib_info.x_pixels=(size_t) (100.0*image->x_resolution);
-      dib_info.y_pixels=(size_t) (100.0*image->y_resolution);
+      dib_info.x_pixels=(size_t) (100.0*image->resolution.x);
+      dib_info.y_pixels=(size_t) (100.0*image->resolution.y);
       break;
     }
   }
index 34f6aefa8a3fd974e6f663cb737932a034753f6b..3971b9f314bfd9b1cb0db65667267082c34a97a0 100644 (file)
@@ -613,8 +613,8 @@ static Image *ReadOneDJVUImage(LoadContext* lc,const int pagenum,
 
         ddjvu_document_get_pageinfo(lc->document, pagenum, &info);
 
-        image->x_resolution = (float) info.dpi;
-        image->y_resolution =(float) info.dpi;
+        image->resolution.x = (float) info.dpi;
+        image->resolution.y =(float) info.dpi;
         if (image_info->density != (char *) NULL)
           {
             int
@@ -627,13 +627,13 @@ static Image *ReadOneDJVUImage(LoadContext* lc,const int pagenum,
               Set rendering resolution.
             */
             flags=ParseGeometry(image_info->density,&geometry_info);
-            image->x_resolution=geometry_info.rho;
-            image->y_resolution=geometry_info.sigma;
+            image->resolution.x=geometry_info.rho;
+            image->resolution.y=geometry_info.sigma;
             if ((flags & SigmaValue) == 0)
-              image->y_resolution=image->x_resolution;
-            info.width*=image->x_resolution/info.dpi;
-            info.height*=image->y_resolution/info.dpi;
-            info.dpi=(ssize_t) MagickMax(image->x_resolution,image->y_resolution);
+              image->resolution.y=image->resolution.x;
+            info.width*=image->resolution.x/info.dpi;
+            info.height*=image->resolution.y/info.dpi;
+            info.dpi=(ssize_t) MagickMax(image->resolution.x,image->resolution.y);
           }
         type = ddjvu_page_get_type(lc->page);
 
index ce11ba0b943e78526523f7a2673e76f8edb2299a..ce6e2fa55c896534de25ebceb4ff4268e9d7185c 100644 (file)
@@ -218,8 +218,8 @@ static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
   */
   screen=ScreenOfDisplay(display,visual_info->screen);
   pixels_per_point=XDPSPixelsPerPoint(screen);
-  if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
-    pixels_per_point=MagickMin(image->x_resolution,image->y_resolution)/
+  if ((image->resolution.x != 0.0) && (image->resolution.y != 0.0))
+    pixels_per_point=MagickMin(image->resolution.x,image->resolution.y)/
       DefaultResolution;
   status=XDPSCreatePixmapForEPSF((DPSContext) NULL,screen,
     GetBlobFileHandle(image),visual_info->depth,pixels_per_point,&pixmap,
index 70fb87520b182117b598fc1c8d7e7c8f1b8e9d78..e2a6bec68b63c775a4761ea898d9b4cd1b401a54 100644 (file)
@@ -479,15 +479,15 @@ static Image *ReadEMFImage(const ImageInfo *image_info,
 
       y_resolution=DefaultResolution;
       x_resolution=DefaultResolution;
-      if (image->y_resolution > 0)
+      if (image->resolution.y > 0)
         {
-          y_resolution=image->y_resolution;
+          y_resolution=image->resolution.y;
           if (image->units == PixelsPerCentimeterResolution)
             y_resolution*=CENTIMETERS_INCH;
         }
-      if (image->x_resolution > 0)
+      if (image->resolution.x > 0)
         {
-          x_resolution=image->x_resolution;
+          x_resolution=image->resolution.x;
           if (image->units == PixelsPerCentimeterResolution)
             x_resolution*=CENTIMETERS_INCH;
         }
@@ -526,22 +526,22 @@ static Image *ReadEMFImage(const ImageInfo *image_info,
         {
           flags=ParseMetaGeometry(geometry,&sans,&sans,&image->columns,
             &image->rows);
-          if (image->x_resolution != 0.0)
-            image->columns=(size_t) floor((image->columns*image->x_resolution)+
+          if (image->resolution.x != 0.0)
+            image->columns=(size_t) floor((image->columns*image->resolution.x)+
               0.5);
-          if (image->y_resolution != 0.0)
-            image->rows=(size_t) floor((image->rows*image->y_resolution)+0.5);
+          if (image->resolution.y != 0.0)
+            image->rows=(size_t) floor((image->rows*image->resolution.y)+0.5);
         }
       else
         {
           *p='\0';
           flags=ParseMetaGeometry(geometry,&sans,&sans,&image->columns,
             &image->rows);
-          if (image->x_resolution != 0.0)
-            image->columns=(size_t) floor(((image->columns*image->x_resolution)/
+          if (image->resolution.x != 0.0)
+            image->columns=(size_t) floor(((image->columns*image->resolution.x)/
               DefaultResolution)+0.5);
-          if (image->y_resolution != 0.0)
-            image->rows=(size_t) floor(((image->rows*image->y_resolution)/
+          if (image->resolution.y != 0.0)
+            image->rows=(size_t) floor(((image->rows*image->resolution.y)/
               DefaultResolution)+0.5);
         }
       geometry=DestroyString(geometry);
index 98de3b706764595beca35411ada15fc145ac94ec..82006cbe1997600c60898862668b61aa8c8e2dc6 100644 (file)
@@ -976,14 +976,14 @@ static MagickBooleanType WriteICONImage(const ImageInfo *image_info,
           case UndefinedResolution:
           case PixelsPerInchResolution:
           {
-            icon_info.x_pixels=(size_t) (100.0*next->x_resolution/2.54);
-            icon_info.y_pixels=(size_t) (100.0*next->y_resolution/2.54);
+            icon_info.x_pixels=(size_t) (100.0*next->resolution.x/2.54);
+            icon_info.y_pixels=(size_t) (100.0*next->resolution.y/2.54);
             break;
           }
           case PixelsPerCentimeterResolution:
           {
-            icon_info.x_pixels=(size_t) (100.0*next->x_resolution);
-            icon_info.y_pixels=(size_t) (100.0*next->y_resolution);
+            icon_info.x_pixels=(size_t) (100.0*next->resolution.x);
+            icon_info.y_pixels=(size_t) (100.0*next->resolution.y);
             break;
           }
         }
index 5a78283b1ef457de40049c61a2572868bb61f8de..d14384168a7086aef0361ff8f5de9792a651c2c1 100644 (file)
@@ -165,8 +165,8 @@ void SetHeaderFromIPL(Image *image, IPLInfo *ipl){
   image->columns = ipl->width;
   image->rows = ipl->height;
   image->depth = ipl->depth;
-  image->x_resolution = 1;
-  image->y_resolution = 1;
+  image->resolution.x = 1;
+  image->resolution.y = 1;
 }
 
 
index 4faf712fb9d31dd71cb29eeb094cc94f582d6701..751a6f1ec747ca7dea1c14f8ff52562607d63740 100644 (file)
@@ -206,8 +206,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);
index 5489429a82280cb8bd9ad13903369d2c61295da4..ece1a9afa498da0e067f6411d752f7860c8b5bab 100644 (file)
@@ -1059,8 +1059,8 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
   if ((jpeg_info.saw_JFIF_marker != 0) && (jpeg_info.X_density != 1) &&
       (jpeg_info.Y_density != 1))
     {
-      image->x_resolution=(double) jpeg_info.X_density;
-      image->y_resolution=(double) jpeg_info.Y_density;
+      image->resolution.x=(double) jpeg_info.X_density;
+      image->resolution.y=(double) jpeg_info.Y_density;
       units=(size_t) jpeg_info.density_unit;
     }
   if (units == 1)
@@ -1879,16 +1879,16 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
   jpeg_info.density_unit=(UINT8) 1;
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(CoderEvent,GetMagickModule(),
-      "Image resolution: %.20g,%.20g",floor(image->x_resolution+0.5),
-      floor(image->y_resolution+0.5));
-  if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
+      "Image resolution: %.20g,%.20g",floor(image->resolution.x+0.5),
+      floor(image->resolution.y+0.5));
+  if ((image->resolution.x != 0.0) && (image->resolution.y != 0.0))
     {
       /*
         Set image resolution.
       */
       jpeg_info.write_JFIF_header=MagickTrue;
-      jpeg_info.X_density=(UINT16) floor(image->x_resolution+0.5);
-      jpeg_info.Y_density=(UINT16) floor(image->y_resolution+0.5);
+      jpeg_info.X_density=(UINT16) floor(image->resolution.x+0.5);
+      jpeg_info.Y_density=(UINT16) floor(image->resolution.y+0.5);
       if (image->units == PixelsPerInchResolution)
         jpeg_info.density_unit=(UINT8) 1;
       if (image->units == PixelsPerCentimeterResolution)
index 6e4a2a19094fed2fee1150d71658a96d42c10574..d0f4ed2a07a97e61684425fe450a359200c27151 100644 (file)
@@ -925,10 +925,10 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
                 if (LocaleCompare(keyword,"resolution") == 0)
                   {
                     flags=ParseGeometry(options,&geometry_info);
-                    image->x_resolution=geometry_info.rho;
-                    image->y_resolution=geometry_info.sigma;
+                    image->resolution.x=geometry_info.rho;
+                    image->resolution.y=geometry_info.sigma;
                     if ((flags & SigmaValue) == 0)
-                      image->y_resolution=image->x_resolution;
+                      image->resolution.y=image->resolution.x;
                     break;
                   }
                 if (LocaleCompare(keyword,"rows") == 0)
@@ -1988,10 +1988,10 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
           CommandOptionToMnemonic(MagickResolutionOptions,image->units));
         (void) WriteBlobString(image,buffer);
       }
-    if ((image->x_resolution != 0) || (image->y_resolution != 0))
+    if ((image->resolution.x != 0) || (image->resolution.y != 0))
       {
         (void) FormatLocaleString(buffer,MaxTextExtent,
-          "resolution=%gx%g\n",image->x_resolution,image->y_resolution);
+          "resolution=%gx%g\n",image->resolution.x,image->resolution.y);
         (void) WriteBlobString(image,buffer);
       }
     if ((image->page.width != 0) || (image->page.height != 0))
index 6cbf2ce8f4680c1f7927c33f2c1696bdebbb2a00..628eb5fccb59b72a9c1e754220e66a793bc1ae49 100644 (file)
@@ -633,10 +633,10 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 if (LocaleCompare(keyword,"resolution") == 0)
                   {
                     flags=ParseGeometry(options,&geometry_info);
-                    image->x_resolution=geometry_info.rho;
-                    image->y_resolution=geometry_info.sigma;
+                    image->resolution.x=geometry_info.rho;
+                    image->resolution.y=geometry_info.sigma;
                     if ((flags & SigmaValue) == 0)
-                      image->y_resolution=image->x_resolution;
+                      image->resolution.y=image->resolution.x;
                     break;
                   }
                 if (LocaleCompare(keyword,"rows") == 0)
@@ -1128,10 +1128,10 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image,
           CommandOptionToMnemonic(MagickResolutionOptions,image->units));
         (void) WriteBlobString(image,buffer);
       }
-    if ((image->x_resolution != 0) || (image->y_resolution != 0))
+    if ((image->resolution.x != 0) || (image->resolution.y != 0))
       {
         (void) FormatLocaleString(buffer,MaxTextExtent,
-          "resolution=%gx%g\n",image->x_resolution,image->y_resolution);
+          "resolution=%gx%g\n",image->resolution.x,image->resolution.y);
         (void) WriteBlobString(image,buffer);
       }
     if ((image->page.width != 0) || (image->page.height != 0))
index c5baf698e84e6833ae86576ec49b9bb5410419a3..c5403672fc1579dffcfd3216500235310c3b8498 100644 (file)
@@ -5351,11 +5351,11 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         if (msl_info->image[n]->units == PixelsPerCentimeterResolution)
           factor=2.54;
         width=(size_t) (x_resolution*msl_info->image[n]->columns/
-          (factor*(msl_info->image[n]->x_resolution == 0.0 ? DefaultResolution :
-          msl_info->image[n]->x_resolution))+0.5);
+          (factor*(msl_info->image[n]->resolution.x == 0.0 ? DefaultResolution :
+          msl_info->image[n]->resolution.x))+0.5);
         height=(size_t) (y_resolution*msl_info->image[n]->rows/
-          (factor*(msl_info->image[n]->y_resolution == 0.0 ? DefaultResolution :
-          msl_info->image[n]->y_resolution))+0.5);
+          (factor*(msl_info->image[n]->resolution.y == 0.0 ? DefaultResolution :
+          msl_info->image[n]->resolution.y))+0.5);
         resample_image=ResizeImage(msl_info->image[n],width,height,
           msl_info->image[n]->filter,msl_info->image[n]->blur,
           msl_info->exception);
@@ -6094,11 +6094,11 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               if (LocaleCompare(keyword,"density") == 0)
                 {
                   flags=ParseGeometry(value,&geometry_info);
-                  msl_info->image[n]->x_resolution=geometry_info.rho;
-                  msl_info->image[n]->y_resolution=geometry_info.sigma;
+                  msl_info->image[n]->resolution.x=geometry_info.rho;
+                  msl_info->image[n]->resolution.y=geometry_info.sigma;
                   if ((flags & SigmaValue) == 0)
-                    msl_info->image[n]->y_resolution=
-                      msl_info->image[n]->x_resolution;
+                    msl_info->image[n]->resolution.y=
+                      msl_info->image[n]->resolution.x;
                   break;
                 }
               (void) SetMSLAttributes(msl_info,keyword,value);
index dcf27c388331393a1d7ec56b7f7caf485d407c52..cf0263c35dbd95264ed1fd3f9d918aa20427e16b 100644 (file)
@@ -183,9 +183,9 @@ static Image *ReadMVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
   if ((image->columns == 0) || (image->rows == 0))
     ThrowReaderException(OptionError,"MustSpecifyImageSize");
   draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
-  draw_info->affine.sx=image->x_resolution == 0.0 ? 1.0 : image->x_resolution/
+  draw_info->affine.sx=image->resolution.x == 0.0 ? 1.0 : image->resolution.x/
     DefaultResolution;
-  draw_info->affine.sy=image->y_resolution == 0.0 ? 1.0 : image->y_resolution/
+  draw_info->affine.sy=image->resolution.y == 0.0 ? 1.0 : image->resolution.y/
     DefaultResolution;
   image->columns=(size_t) (draw_info->affine.sx*image->columns);
   image->rows=(size_t) (draw_info->affine.sy*image->rows);
index 506fd84fafad47e5ca9d4755fa23d372338bac83..87fc6c142bf4147df24ebcd6f1589bef0914781d 100644 (file)
@@ -107,9 +107,6 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
   Image
     *image;
 
-  MagickBooleanType
-    status;
-
   PangoContext
     *context;
 
@@ -154,7 +151,7 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
   */
   fontmap=(PangoFontMap *) pango_ft2_font_map_new();
   pango_ft2_font_map_set_resolution((PangoFT2FontMap *) fontmap,
-    image->x_resolution,image->y_resolution);
+    image->resolution.x,image->resolution.y);
   pango_ft2_font_map_set_default_substitute((PangoFT2FontMap *) fontmap,NULL,
     NULL,NULL);
   context=pango_font_map_create_context(fontmap);
@@ -162,7 +159,11 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
     Render caption.
   */
   layout=pango_layout_new(context);
-  description=pango_font_description_from_string("Arial,20");
+  draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
+  description=pango_font_description_from_string(draw_info->font ==
+    (char *) NULL ? "helvetica" : draw_info->font);
+  pango_font_description_set_size(description,PANGO_SCALE*
+    draw_info->pointsize);
   pango_layout_set_font_description(layout,description);
   pango_font_description_free(description);
   property=InterpretImageProperties(image_info,image,image_info->filename,
@@ -172,12 +173,18 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
   caption=ConstantString(GetImageProperty(image,"caption",exception));
   pango_layout_set_text(layout,caption,-1);
   pango_layout_context_changed(layout);
-  if (image->columns == 0)
+  if (image->columns != 0)
+    pango_layout_set_width(layout,(PANGO_SCALE*image->columns*
+      image->resolution.x+36.0)/72.0);
+  else
     {
       pango_layout_get_pixel_extents(layout,NULL,&extent);
       image->columns=extent.x+extent.width;
     }
-  if (image->rows == 0)
+  if (image->rows != 0)
+    pango_layout_set_height(layout,(PANGO_SCALE*image->columns*
+      image->resolution.x+36.0)/72.0);
+  else
     {
       pango_layout_get_pixel_extents(layout,NULL,&extent);
       image->rows=extent.y+extent.height;
@@ -187,7 +194,10 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
   */
   canvas=(FT_Bitmap *) AcquireMagickMemory(sizeof(*canvas));
   if (canvas == (FT_Bitmap *) NULL)
-    ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+    {
+      draw_info=DestroyDrawInfo(draw_info);
+      ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+    }
   canvas->width=image->columns;
   canvas->pitch=(canvas->width+3) & ~3;
   canvas->rows=image->rows;
@@ -195,26 +205,26 @@ static Image *ReadPANGOImage(const ImageInfo *image_info,
     canvas->rows*sizeof(*canvas->buffer));
   if (canvas->buffer == (unsigned char *) NULL)
     {
+      draw_info=DestroyDrawInfo(draw_info);
       canvas=(FT_Bitmap *) RelinquishMagickMemory(canvas);
       ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
     }
   canvas->num_grays=256;
   canvas->pixel_mode=ft_pixel_mode_grays;
   ResetMagickMemory(canvas->buffer,0x00,canvas->pitch*canvas->rows);
-  /* wrapping: pango_layout_set_width(layout,72*image->columns); */
   pango_ft2_render_layout(canvas,layout,0,0);
   /*
     Convert caption to image.
   */
   if (SetImageBackgroundColor(image,exception) == MagickFalse)
     {
+      draw_info=DestroyDrawInfo(draw_info);
       canvas->buffer=(unsigned char *) RelinquishMagickMemory(canvas->buffer);
       canvas=(FT_Bitmap *) RelinquishMagickMemory(canvas);
       caption=DestroyString(caption);
       image=DestroyImageList(image);
       return((Image *) NULL);
     }
-  draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
   GetPixelInfo(image,&fill_color);
   p=canvas->buffer;
   for (y=0; y < (ssize_t) image->rows; y++)
index 6a36b2bdb8d2dc8d71692192faf31102295756ac..7d4f602c2f011593b97cbfbfb4409bfad5b904ae 100644 (file)
@@ -227,7 +227,7 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
   */
   delta.x=DefaultResolution;
   delta.y=DefaultResolution;
-  if ((image->x_resolution == 0.0) || (image->y_resolution == 0.0))
+  if ((image->resolution.x == 0.0) || (image->resolution.y == 0.0))
     {
       GeometryInfo
         geometry_info;
@@ -236,10 +236,10 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
         flags;
 
       flags=ParseGeometry(PSDensityGeometry,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
   /*
     Determine page geometry from the PCL media box.
@@ -328,9 +328,9 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
   if (image_info->page != (char *) NULL)
     (void) ParseAbsoluteGeometry(image_info->page,&page);
   (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",
-    image->x_resolution,image->y_resolution);
-  page.width=(size_t) floor(page.width*image->x_resolution/delta.x+0.5);
-  page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
+    image->resolution.x,image->resolution.y);
+  page.width=(size_t) floor(page.width*image->resolution.x/delta.x+0.5);
+  page.height=(size_t) floor(page.height*image->resolution.y/delta.y+
     0.5);
   (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
      page.width,(double) page.height);
index 712d9e09e82bba793bd287509c1d6d69785e1ba6..b6f7eeb6f73023c2e5fbda02e8a2ff31113cfe11 100644 (file)
@@ -347,8 +347,8 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     image->depth=pcx_info.bits_per_pixel <= 8 ? 8U : MAGICKCORE_QUANTUM_DEPTH;
     image->units=PixelsPerInchResolution;
-    image->x_resolution=(double) pcx_info.horizontal_resolution;
-    image->y_resolution=(double) pcx_info.vertical_resolution;
+    image->resolution.x=(double) pcx_info.horizontal_resolution;
+    image->resolution.y=(double) pcx_info.vertical_resolution;
     image->colors=16;
     pcx_colormap=(unsigned char *) AcquireQuantumMemory(256UL,
       3*sizeof(*pcx_colormap));
@@ -922,16 +922,16 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image,
       case PixelsPerInchResolution:
       default:
       {
-        pcx_info.horizontal_resolution=(unsigned short) image->x_resolution;
-        pcx_info.vertical_resolution=(unsigned short) image->y_resolution;
+        pcx_info.horizontal_resolution=(unsigned short) image->resolution.x;
+        pcx_info.vertical_resolution=(unsigned short) image->resolution.y;
         break;
       }
       case PixelsPerCentimeterResolution:
       {
         pcx_info.horizontal_resolution=(unsigned short)
-          (2.54*image->x_resolution+0.5);
+          (2.54*image->resolution.x+0.5);
         pcx_info.vertical_resolution=(unsigned short)
-          (2.54*image->y_resolution+0.5);
+          (2.54*image->resolution.y+0.5);
         break;
       }
     }
index d14ea54f25b1d1056dc031d5b238f9f34ae1ef33..435a525b7d5d1c7b0a27747363938b39aed86f45 100644 (file)
@@ -397,13 +397,13 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   */
   delta.x=DefaultResolution;
   delta.y=DefaultResolution;
-  if ((image->x_resolution == 0.0) || (image->y_resolution == 0.0))
+  if ((image->resolution.x == 0.0) || (image->resolution.y == 0.0))
     {
       flags=ParseGeometry(PSDensityGeometry,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
   /*
     Determine page geometry from the PDF media box.
@@ -585,19 +585,19 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   if (image_info->density != (char *) NULL)
     {
       flags=ParseGeometry(image_info->density,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
-  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",image->x_resolution,
-    image->y_resolution);
+  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",image->resolution.x,
+    image->resolution.y);
   if (image_info->page != (char *) NULL)
     {
       (void) ParseAbsoluteGeometry(image_info->page,&page);
-      page.width=(size_t) floor((double) (page.width*image->x_resolution/
+      page.width=(size_t) floor((double) (page.width*image->resolution.x/
         delta.x)+0.5);
-      page.height=(size_t) floor((double) (page.height*image->y_resolution/
+      page.height=(size_t) floor((double) (page.height*image->resolution.y/
         delta.y)+0.5);
       (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
         page.width,(double) page.height);
@@ -1263,8 +1263,8 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image,
     */
     delta.x=DefaultResolution;
     delta.y=DefaultResolution;
-    resolution.x=image->x_resolution;
-    resolution.y=image->y_resolution;
+    resolution.x=image->resolution.x;
+    resolution.y=image->resolution.y;
     if ((resolution.x == 0.0) || (resolution.y == 0.0))
       {
         flags=ParseGeometry(PSDensityGeometry,&geometry_info);
index 95c2f1c07bb987366bbb43bfecf8281316475417..8276928462fd6be8b2ac66a4b82c11707b4e8a99 100644 (file)
@@ -886,8 +886,8 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
   flags=0;
   image->columns=1UL*(frame.right-frame.left);
   image->rows=1UL*(frame.bottom-frame.top);
-  image->x_resolution=DefaultResolution;
-  image->y_resolution=DefaultResolution;
+  image->resolution.x=DefaultResolution;
+  image->resolution.y=DefaultResolution;
   image->units=UndefinedResolution;
   /*
     Interpret PICT opcodes.
@@ -963,8 +963,8 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
             ReadRectangle(image,frame);
             ReadPixmap(pixmap);
             image->depth=1UL*pixmap.component_size;
-            image->x_resolution=1.0*pixmap.horizontal_resolution;
-            image->y_resolution=1.0*pixmap.vertical_resolution;
+            image->resolution.x=1.0*pixmap.horizontal_resolution;
+            image->resolution.y=1.0*pixmap.vertical_resolution;
             image->units=PixelsPerInchResolution;
             (void) ReadBlobMSBLong(image);
             flags=1L*ReadBlobMSBShort(image);
@@ -1077,8 +1077,8 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
                 tile_image->depth=1UL*pixmap.component_size;
                 tile_image->matte=pixmap.component_count == 4 ?
                   MagickTrue : MagickFalse;
-                tile_image->x_resolution=(double) pixmap.horizontal_resolution;
-                tile_image->y_resolution=(double) pixmap.vertical_resolution;
+                tile_image->resolution.x=(double) pixmap.horizontal_resolution;
+                tile_image->resolution.y=(double) pixmap.vertical_resolution;
                 tile_image->units=PixelsPerInchResolution;
                 if (tile_image->matte != MagickFalse)
                   image->matte=tile_image->matte;
@@ -1633,9 +1633,9 @@ static MagickBooleanType WritePICTImage(const ImageInfo *image_info,
   pixmap.table=0;
   pixmap.reserved=0;
   transfer_mode=0;
-  x_resolution=image->x_resolution != 0.0 ? image->x_resolution :
+  x_resolution=image->resolution.x != 0.0 ? image->resolution.x :
     DefaultResolution;
-  y_resolution=image->y_resolution != 0.0 ? image->y_resolution :
+  y_resolution=image->resolution.y != 0.0 ? image->resolution.y :
     DefaultResolution;
   storage_class=image->storage_class;
   if (image_info->compression == JPEGCompression)
index 1dfb11c0c85bbf097f5adfa42c7c41cf745d1d1a..cc10247c8101e19b36488ba4c74245bdbc44f59b 100644 (file)
@@ -2443,14 +2443,14 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
       */
       (void) png_get_pHYs(ping,ping_info,&x_resolution,&y_resolution,
         &unit_type);
-      image->x_resolution=(double) x_resolution;
-      image->y_resolution=(double) y_resolution;
+      image->resolution.x=(double) x_resolution;
+      image->resolution.y=(double) y_resolution;
 
       if (unit_type == PNG_RESOLUTION_METER)
         {
           image->units=PixelsPerCentimeterResolution;
-          image->x_resolution=(double) x_resolution/100.0;
-          image->y_resolution=(double) y_resolution/100.0;
+          image->resolution.x=(double) x_resolution/100.0;
+          image->resolution.y=(double) y_resolution/100.0;
         }
 
       if (logging != MagickFalse)
@@ -4274,13 +4274,13 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
       {
         if (length > 8)
           {
-            image->x_resolution=(double) mng_get_long(p);
-            image->y_resolution=(double) mng_get_long(&p[4]);
+            image->resolution.x=(double) mng_get_long(p);
+            image->resolution.y=(double) mng_get_long(&p[4]);
             if ((int) p[8] == PNG_RESOLUTION_METER)
               {
                 image->units=PixelsPerCentimeterResolution;
-                image->x_resolution=image->x_resolution/100.0f;
-                image->y_resolution=image->y_resolution/100.0f;
+                image->resolution.x=image->resolution.x/100.0f;
+                image->resolution.y=image->resolution.y/100.0f;
               }
           }
 
@@ -8990,7 +8990,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
 #if defined(PNG_pHYs_SUPPORTED)
   if (ping_exclude_pHYs == MagickFalse)
   {
-  if ((image->x_resolution != 0) && (image->y_resolution != 0) &&
+  if ((image->resolution.x != 0) && (image->resolution.y != 0) &&
       (!mng_info->write_mng || !mng_info->equal_physs))
     {
       if (logging != MagickFalse)
@@ -9001,23 +9001,23 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
         {
           ping_pHYs_unit_type=PNG_RESOLUTION_METER;
           ping_pHYs_x_resolution=
-             (png_uint_32) ((100.0*image->x_resolution+0.5)/2.54);
+             (png_uint_32) ((100.0*image->resolution.x+0.5)/2.54);
           ping_pHYs_y_resolution=
-             (png_uint_32) ((100.0*image->y_resolution+0.5)/2.54);
+             (png_uint_32) ((100.0*image->resolution.y+0.5)/2.54);
         }
 
       else if (image->units == PixelsPerCentimeterResolution)
         {
           ping_pHYs_unit_type=PNG_RESOLUTION_METER;
-          ping_pHYs_x_resolution=(png_uint_32) (100.0*image->x_resolution+0.5);
-          ping_pHYs_y_resolution=(png_uint_32) (100.0*image->y_resolution+0.5);
+          ping_pHYs_x_resolution=(png_uint_32) (100.0*image->resolution.x+0.5);
+          ping_pHYs_y_resolution=(png_uint_32) (100.0*image->resolution.y+0.5);
         }
 
       else
         {
           ping_pHYs_unit_type=PNG_RESOLUTION_UNKNOWN;
-          ping_pHYs_x_resolution=(png_uint_32) image->x_resolution;
-          ping_pHYs_y_resolution=(png_uint_32) image->y_resolution;
+          ping_pHYs_x_resolution=(png_uint_32) image->resolution.x;
+          ping_pHYs_y_resolution=(png_uint_32) image->resolution.y;
         }
 
       if (logging != MagickFalse)
@@ -11926,7 +11926,7 @@ static MagickBooleanType WriteOneJNGImage(MngInfo *mng_info,
         }
     }
 
-  if (image->x_resolution && image->y_resolution && !mng_info->equal_physs)
+  if (image->resolution.x && image->resolution.y && !mng_info->equal_physs)
     {
       /*
          Write JNG pHYs chunk
@@ -11937,10 +11937,10 @@ static MagickBooleanType WriteOneJNGImage(MngInfo *mng_info,
       if (image->units == PixelsPerInchResolution)
         {
           PNGLong(chunk+4,(png_uint_32)
-            (image->x_resolution*100.0/2.54+0.5));
+            (image->resolution.x*100.0/2.54+0.5));
 
           PNGLong(chunk+8,(png_uint_32)
-            (image->y_resolution*100.0/2.54+0.5));
+            (image->resolution.y*100.0/2.54+0.5));
 
           chunk[12]=1;
         }
@@ -11950,18 +11950,18 @@ static MagickBooleanType WriteOneJNGImage(MngInfo *mng_info,
           if (image->units == PixelsPerCentimeterResolution)
             {
               PNGLong(chunk+4,(png_uint_32)
-                (image->x_resolution*100.0+0.5));
+                (image->resolution.x*100.0+0.5));
 
               PNGLong(chunk+8,(png_uint_32)
-                (image->y_resolution*100.0+0.5));
+                (image->resolution.y*100.0+0.5));
 
               chunk[12]=1;
             }
 
           else
             {
-              PNGLong(chunk+4,(png_uint_32) (image->x_resolution+0.5));
-              PNGLong(chunk+8,(png_uint_32) (image->y_resolution+0.5));
+              PNGLong(chunk+4,(png_uint_32) (image->resolution.x+0.5));
+              PNGLong(chunk+8,(png_uint_32) (image->resolution.y+0.5));
               chunk[12]=0;
             }
         }
@@ -12500,8 +12500,8 @@ static MagickBooleanType WriteMNGImage(const ImageInfo *image_info,Image *image,
               mng_info->equal_srgbs=MagickFalse;
 
             if ((next_image->units != next_image->next->units) ||
-                (next_image->x_resolution != next_image->next->x_resolution) ||
-                (next_image->y_resolution != next_image->next->y_resolution))
+                (next_image->resolution.x != next_image->next->resolution.x) ||
+                (next_image->resolution.y != next_image->next->resolution.y))
               mng_info->equal_physs=MagickFalse;
 
             if (mng_info->equal_chrms)
@@ -12775,7 +12775,7 @@ static MagickBooleanType WriteMNGImage(const ImageInfo *image_info,Image *image,
              mng_info->have_write_global_chrm=MagickTrue;
            }
        }
-     if (image->x_resolution && image->y_resolution && mng_info->equal_physs)
+     if (image->resolution.x && image->resolution.y && mng_info->equal_physs)
        {
          /*
             Write MNG pHYs chunk
@@ -12787,10 +12787,10 @@ static MagickBooleanType WriteMNGImage(const ImageInfo *image_info,Image *image,
          if (image->units == PixelsPerInchResolution)
            {
              PNGLong(chunk+4,(png_uint_32)
-               (image->x_resolution*100.0/2.54+0.5));
+               (image->resolution.x*100.0/2.54+0.5));
 
              PNGLong(chunk+8,(png_uint_32)
-               (image->y_resolution*100.0/2.54+0.5));
+               (image->resolution.y*100.0/2.54+0.5));
 
              chunk[12]=1;
            }
@@ -12800,18 +12800,18 @@ static MagickBooleanType WriteMNGImage(const ImageInfo *image_info,Image *image,
              if (image->units == PixelsPerCentimeterResolution)
                {
                  PNGLong(chunk+4,(png_uint_32)
-                   (image->x_resolution*100.0+0.5));
+                   (image->resolution.x*100.0+0.5));
 
                  PNGLong(chunk+8,(png_uint_32)
-                   (image->y_resolution*100.0+0.5));
+                   (image->resolution.y*100.0+0.5));
 
                  chunk[12]=1;
                }
 
              else
                {
-                 PNGLong(chunk+4,(png_uint_32) (image->x_resolution+0.5));
-                 PNGLong(chunk+8,(png_uint_32) (image->y_resolution+0.5));
+                 PNGLong(chunk+4,(png_uint_32) (image->resolution.x+0.5));
+                 PNGLong(chunk+8,(png_uint_32) (image->resolution.y+0.5));
                  chunk[12]=0;
                }
            }
index 8267d4f3628f9ad36187d452151de2d93b81bb84..52d8f3c57d8773817d5ef78fc81286039a02acd7 100644 (file)
@@ -468,13 +468,13 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
   */
   delta.x=DefaultResolution;
   delta.y=DefaultResolution;
-  if ((image->x_resolution == 0.0) || (image->y_resolution == 0.0))
+  if ((image->resolution.x == 0.0) || (image->resolution.y == 0.0))
     {
       flags=ParseGeometry(PSDensityGeometry,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
   /*
     Determine page geometry from the Postscript bounding box.
@@ -724,18 +724,18 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
   if (image_info->density != (char *) NULL)
     {
       flags=ParseGeometry(image_info->density,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
   (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",
-    image->x_resolution,image->y_resolution);
+    image->resolution.x,image->resolution.y);
   if (image_info->page != (char *) NULL)
     (void) ParseAbsoluteGeometry(image_info->page,&page);
-  page.width=(size_t) floor((double) (page.width*image->x_resolution/delta.x)+
+  page.width=(size_t) floor((double) (page.width*image->resolution.x/delta.x)+
     0.5);
-  page.height=(size_t) floor((double) (page.height*image->y_resolution/delta.y)+
+  page.height=(size_t) floor((double) (page.height*image->resolution.y/delta.y)+
     0.5);
   (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
     page.width,(double) page.height);
@@ -1430,8 +1430,8 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image,
       (void) TransformImageColorspace(image,RGBColorspace,exception);
     delta.x=DefaultResolution;
     delta.y=DefaultResolution;
-    resolution.x=image->x_resolution;
-    resolution.y=image->y_resolution;
+    resolution.x=image->resolution.x;
+    resolution.y=image->resolution.y;
     if ((resolution.x == 0.0) || (resolution.y == 0.0))
       {
         flags=ParseGeometry(PSDensityGeometry,&geometry_info);
index 79c2dd5a44c5aa2759231a342f7312322c6649b1..604430726c243f4effdb663a6723b86f7665350f 100644 (file)
@@ -494,8 +494,8 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image,
     */
     delta.x=DefaultResolution;
     delta.y=DefaultResolution;
-    resolution.x=image->x_resolution;
-    resolution.y=image->y_resolution;
+    resolution.x=image->resolution.x;
+    resolution.y=image->resolution.y;
     if ((resolution.x == 0.0) || (resolution.y == 0.0))
       {
         flags=ParseGeometry(PSDensityGeometry,&geometry_info);
index 8df9d622b129a172637c894d5143cf2a47eea925..aeb5d857f87a4cb90d96186aa90306c1b94f98e9 100644 (file)
@@ -926,8 +926,8 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image,
     */
     delta.x=DefaultResolution;
     delta.y=DefaultResolution;
-    resolution.x=image->x_resolution;
-    resolution.y=image->y_resolution;
+    resolution.x=image->resolution.x;
+    resolution.y=image->resolution.y;
     if ((resolution.x == 0.0) || (resolution.y == 0.0))
       {
         flags=ParseGeometry(PSDensityGeometry,&geometry_info);
index c1fa4b8e6f94b2f79c47c53fc17f2141b2c386e1..2daa586bf12cfca9169c0b5fb11f0a6e273c3205 100644 (file)
@@ -450,15 +450,15 @@ static MagickBooleanType ParseImageResourceBlocks(Image *image,
           Resolution info.
         */
         p=PushShortPixel(MSBEndian,p,&resolution);
-        image->x_resolution=(double) resolution;
-        (void) FormatLocaleString(value,MaxTextExtent,"%g",image->x_resolution);
+        image->resolution.x=(double) resolution;
+        (void) FormatLocaleString(value,MaxTextExtent,"%g",image->resolution.x);
         (void) SetImageProperty(image,"tiff:XResolution",value,exception);
         p=PushShortPixel(MSBEndian,p,&short_sans);
         p=PushShortPixel(MSBEndian,p,&short_sans);
         p=PushShortPixel(MSBEndian,p,&short_sans);
         p=PushShortPixel(MSBEndian,p,&resolution);
-        image->y_resolution=(double) resolution;
-        (void) FormatLocaleString(value,MaxTextExtent,"%g",image->y_resolution);
+        image->resolution.y=(double) resolution;
+        (void) FormatLocaleString(value,MaxTextExtent,"%g",image->resolution.y);
         (void) SetImageProperty(image,"tiff:YResolution",value,exception);
         p=PushShortPixel(MSBEndian,p,&short_sans);
         p=PushShortPixel(MSBEndian,p,&short_sans);
@@ -1929,13 +1929,13 @@ static void WriteResolutionResourceBlock(Image *image)
   unsigned short
     units;
 
-  x_resolution=65536.0*image->x_resolution+0.5;
-  y_resolution=65536.0*image->y_resolution+0.5;
+  x_resolution=65536.0*image->resolution.x+0.5;
+  y_resolution=65536.0*image->resolution.y+0.5;
   units=1;
   if (image->units == PixelsPerCentimeterResolution)
     {
-      x_resolution=2.54*65536.0*image->x_resolution*0.5;
-      y_resolution=2.54*65536.0*image->y_resolution+0.5;
+      x_resolution=2.54*65536.0*image->resolution.x*0.5;
+      y_resolution=2.54*65536.0*image->resolution.y+0.5;
       units=2;
     }
   (void) WriteBlob(image,4,(const unsigned char *) "8BIM");
index 0f1b4114eb4113ca5e84e2b9ee0fb7a8d13c35da..2bba1453524089d8cd769c17c6df1b7511a5bb06 100644 (file)
@@ -214,8 +214,8 @@ static Image *ReadSCTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   count=ReadBlob(image,768,buffer);
   if (separations_mask == 0x0f)
     image->colorspace=CMYKColorspace;
-  image->x_resolution=1.0*image->columns/width;
-  image->y_resolution=1.0*image->rows/height;
+  image->resolution.x=1.0*image->columns/width;
+  image->resolution.y=1.0*image->rows/height;
   if (image_info->ping != MagickFalse)
     {
       (void) CloseBlob(image);
index 17adda704200046f094d496a3e004dccd6b45976..97dd237fe8a146aa3defc55b8047a81f16c5e58d 100644 (file)
@@ -2729,8 +2729,8 @@ static void SVGSetImageSize(int *width,int *height,gpointer context)
     *image;
 
   image=(Image *) context;
-  *width=(int) (*width*image->x_resolution/72.0);
-  *height=(int) (*height*image->y_resolution/72.0);
+  *width=(int) (*width*image->resolution.x/72.0);
+  *height=(int) (*height*image->resolution.y/72.0);
 }
 #endif
 
@@ -2836,9 +2836,9 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
         ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
       rsvg_handle_set_base_uri(svg_handle,image_info->filename);
       rsvg_handle_set_size_callback(svg_handle,SVGSetImageSize,image,NULL);
-      if ((image->x_resolution != 72.0) && (image->y_resolution != 72.0))
-        rsvg_handle_set_dpi_x_y(svg_handle,image->x_resolution,
-          image->y_resolution);
+      if ((image->resolution.x != 72.0) && (image->resolution.y != 72.0))
+        rsvg_handle_set_dpi_x_y(svg_handle,image->resolution.x,
+          image->resolution.y);
       while ((n=ReadBlob(image,MaxTextExtent,message)) != 0)
       {
         error=(GError *) NULL;
index c02fc0478e56c3629423cce67b4b360bec744c0c..f74f16df175ac48f26a249d4060e51737e756d0a 100644 (file)
@@ -366,7 +366,7 @@ static Image *ReadGROUP4Image(const ImageInfo *image_info,
   length=WriteLSBLong(file,(size_t) (strip_offset-8));
   length=fwrite("\050\001\003\000\001\000\000\000\002\000\000\000",1,12,file);
   length=fwrite("\000\000\000\000",1,4,file);
-  length=WriteLSBLong(file,(long) image->x_resolution);
+  length=WriteLSBLong(file,(long) image->resolution.x);
   length=WriteLSBLong(file,1);
   for (length=0; (c=ReadBlobByte(image)) != EOF; length++)
     (void) fputc(c,file);
@@ -1001,12 +1001,12 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
     (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLESPERPIXEL,
       &samples_per_pixel);
     (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_RESOLUTIONUNIT,&units);
-    x_resolution=(float) image->x_resolution;
-    y_resolution=(float) image->y_resolution;
+    x_resolution=(float) image->resolution.x;
+    y_resolution=(float) image->resolution.y;
     (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_XRESOLUTION,&x_resolution);
     (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_YRESOLUTION,&y_resolution);
-    image->x_resolution=x_resolution;
-    image->y_resolution=y_resolution;
+    image->resolution.x=x_resolution;
+    image->resolution.y=y_resolution;
     x_position=(float) image->page.x/x_resolution;
     y_position=(float) image->page.y/y_resolution;
     (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_XPOSITION,&x_position);
@@ -3006,7 +3006,7 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
     option=GetImageOption(image_info,"tiff:tile-geometry");
     if (option == (const char *) NULL)
       (void) TIFFSetField(tiff,TIFFTAG_ROWSPERSTRIP,rows_per_strip);
-    if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
+    if ((image->resolution.x != 0.0) && (image->resolution.y != 0.0))
       {
         unsigned short
           units;
@@ -3020,17 +3020,17 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
         if (image->units == PixelsPerCentimeterResolution)
           units=RESUNIT_CENTIMETER;
         (void) TIFFSetField(tiff,TIFFTAG_RESOLUTIONUNIT,(uint16) units);
-        (void) TIFFSetField(tiff,TIFFTAG_XRESOLUTION,image->x_resolution);
-        (void) TIFFSetField(tiff,TIFFTAG_YRESOLUTION,image->y_resolution);
+        (void) TIFFSetField(tiff,TIFFTAG_XRESOLUTION,image->resolution.x);
+        (void) TIFFSetField(tiff,TIFFTAG_YRESOLUTION,image->resolution.y);
         if ((image->page.x != 0) || (image->page.y != 0))
           {
             /*
               Set image position.
             */
             (void) TIFFSetField(tiff,TIFFTAG_XPOSITION,(float) image->page.x/
-              image->x_resolution);
+              image->resolution.x);
             (void) TIFFSetField(tiff,TIFFTAG_YPOSITION,(float) image->page.y/
-              image->y_resolution);
+              image->resolution.y);
           }
       }
     if (image->chromaticity.white_point.x != 0.0)
index b001c70468770a2ccadd2112284c146b5af1eb19..412a30cc64a64df999485a5b617d5a11c5adeb39 100644 (file)
@@ -200,7 +200,7 @@ static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image,
   */
   delta.x=DefaultResolution;
   delta.y=DefaultResolution;
-  if ((image->x_resolution == 0.0) || (image->y_resolution == 0.0))
+  if ((image->resolution.x == 0.0) || (image->resolution.y == 0.0))
     {
       GeometryInfo
         geometry_info;
@@ -209,10 +209,10 @@ static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image,
         flags;
 
       flags=ParseGeometry(PSDensityGeometry,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
   page.width=612;
   page.height=792;
@@ -223,9 +223,9 @@ static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image,
   /*
     Initialize Image structure.
   */
-  image->columns=(size_t) floor((((double) page.width*image->x_resolution)/
+  image->columns=(size_t) floor((((double) page.width*image->resolution.x)/
     delta.x)+0.5);
-  image->rows=(size_t) floor((((double) page.height*image->y_resolution)/
+  image->rows=(size_t) floor((((double) page.height*image->resolution.y)/
     delta.y)+0.5);
   image->page.x=0;
   image->page.y=0;
index 257c5e849972e2978b067945d16877943378491b..0e1b8ec5e54d3126686f3bb879f34916e206cbf6 100644 (file)
@@ -1021,8 +1021,8 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
               if(BitmapHeader1.HorzRes && BitmapHeader1.VertRes)
                 {
                   image->units=PixelsPerCentimeterResolution;
-                  image->x_resolution=BitmapHeader1.HorzRes/470.0;
-                  image->y_resolution=BitmapHeader1.VertRes/470.0;
+                  image->resolution.x=BitmapHeader1.HorzRes/470.0;
+                  image->resolution.y=BitmapHeader1.VertRes/470.0;
                 }
               image->columns=BitmapHeader1.Width;
               image->rows=BitmapHeader1.Heigth;
@@ -1077,8 +1077,8 @@ static Image *ReadWPGImage(const ImageInfo *image_info,
               image->page.y=(int) (BitmapHeader2.LowLeftX/470.0);
               if(BitmapHeader2.HorzRes && BitmapHeader2.VertRes)
                 {
-                  image->x_resolution=BitmapHeader2.HorzRes/470.0;
-                  image->y_resolution=BitmapHeader2.VertRes/470.0;
+                  image->resolution.x=BitmapHeader2.HorzRes/470.0;
+                  image->resolution.y=BitmapHeader2.VertRes/470.0;
                 }
               image->columns=BitmapHeader2.Width;
               image->rows=BitmapHeader2.Heigth;
index 2109f8671d92bdbce0ddf0fc0f7dd4fbbd845475..96242ebe2d2f17494202af409cd1fc4498d4b718 100644 (file)
@@ -1134,8 +1134,8 @@ static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception)
 
         /* BOGUS: we don't write these yet because we aren't
               reading them properly yet :(
-              image->x_resolution = xres;
-              image->y_resolution = yres;
+              image->resolution.x = xres;
+              image->resolution.y = yres;
         */
       }
       break;
index 8e8c9d55e383ae82d112f602c7b7f1f7f5ea95ec..f4dd9c3213a5e8f27c884cece500192fc8836cd5 100644 (file)
@@ -181,7 +181,7 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
   */
   delta.x=DefaultResolution;
   delta.y=DefaultResolution;
-  if ((image->x_resolution == 0.0) || (image->y_resolution == 0.0))
+  if ((image->resolution.x == 0.0) || (image->resolution.y == 0.0))
     {
       GeometryInfo
         geometry_info;
@@ -190,13 +190,13 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
         flags;
 
       flags=ParseGeometry(PSDensityGeometry,&geometry_info);
-      image->x_resolution=geometry_info.rho;
-      image->y_resolution=geometry_info.sigma;
+      image->resolution.x=geometry_info.rho;
+      image->resolution.y=geometry_info.sigma;
       if ((flags & SigmaValue) == 0)
-        image->y_resolution=image->x_resolution;
+        image->resolution.y=image->resolution.x;
     }
   (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",
-    image->x_resolution,image->y_resolution);
+    image->resolution.x,image->resolution.y);
   /*
     Determine page geometry from the XPS media box.
   */
@@ -283,8 +283,8 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
     (void) ParseAbsoluteGeometry(PSPageGeometry,&page);
   if (image_info->page != (char *) NULL)
     (void) ParseAbsoluteGeometry(image_info->page,&page);
-  page.width=(size_t) floor(page.width*image->y_resolution/delta.x+0.5);
-  page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
+  page.width=(size_t) floor(page.width*image->resolution.y/delta.x+0.5);
+  page.height=(size_t) floor(page.height*image->resolution.y/delta.y+
     0.5);
   (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
     page.width,(double) page.height);
index 3761604f5112089a409e7f016adabca94d961890..48c1bdd58d3de57ecb540e8837d984056728a00c 100644 (file)
@@ -27,9 +27,6 @@
 /* Subdirectory of lib where coder modules are installed */
 #undef CODER_RELATIVE_PATH
 
-/* ARCH specific config directory */
-#undef CONFIGDIR_ARCH
-
 /* Directory where architecture-dependent configuration files live. */
 #undef CONFIGURE_PATH
 
 /* Define if you have umem memory allocation library */
 #undef HasUMEM
 
-/* ARCH specific include directory */
-#undef INCLUDEDIR_ARCH
+/* Directory where ImageMagick headers live. */
+#undef INCLUDE_PATH
 
 /* ImageMagick is formally installed under prefix */
 #undef INSTALLED_SUPPORT
index 1aff39a8e4a61a243eff3919a169ff438a77b847..37d6ebd84315154c040f48db3187ec6c905c2da1 100644 (file)
@@ -15,7 +15,7 @@
   <configure name="CONFIGURE" value="./configure "/>
   <configure name="PREFIX" value="/usr/local"/>
   <configure name="EXEC-PREFIX" value="/usr/local"/>
-  <configure name="CONFIGURE_PATH" value="/usr/local/etc/ImageMagick/"/>
+  <configure name="CONFIGURE_PATH" value="/usr/local/lib/ImageMagick-7.0.0/ImageMagick/"/>
   <configure name="SHARE_PATH" value="/usr/local/share/ImageMagick-7.0.0"/>
   <configure name="DOCUMENTATION_PATH" value="/usr/local/share/doc/ImageMagick/"/>
   <configure name="EXECUTABLE_PATH" value="/usr/local/bin"/>
index 0d13684e7a776618ee50c4d6fb8f542b889ac708..50b924afc99204c9c74f3e2188bf2d5f19014f37 100755 (executable)
--- a/configure
+++ b/configure
@@ -728,6 +728,7 @@ FILTER_PATH
 CODER_PATH
 LIBRARY_PATH
 EXECUTABLE_PATH
+INCLUDE_PATH
 PERLMAINCC
 XML_LIBS
 XML_DELEGATE_FALSE
@@ -8267,12 +8268,7 @@ else
 fi
 
 
-
-cat >>confdefs.h <<_ACEOF
-#define INCLUDEDIR_ARCH "$includedir_arch"
-_ACEOF
-
-INCLUDEDIR_ARCH="$includedir_arch"
+eval "eval INCLUDEDIR_ARCH=$includedir_arch"
 
 
 #
@@ -8287,11 +8283,7 @@ else
 fi
 
 
-
-cat >>confdefs.h <<_ACEOF
-#define CONFIGDIR_ARCH "$configdir_arch"
-_ACEOF
-
+eval "eval CONFIGDIR_ARCH=$configdir_arch"
 CONFIGDIR_ARCH="$configdir_arch"
 
 
 #
 # Configure install Paths
 #
+# Path to ImageMagick header files
+INCLUDE_RELATIVE_PATH="ImageMagick"
+INCLUDE_PATH="${INCLUDEDIR_ARCH}/${INCLUDE_RELATIVE_PATH}"
+DEFINE_INCLUDE_PATH="${INCLUDEDIR_ARCH}/${INCLUDE_RELATIVE_PATH}/"
+case "${build_os}" in
+  mingw* )
+    DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
+    ;;
+esac
+
+cat >>confdefs.h <<_ACEOF
+#define INCLUDE_PATH "$DEFINE_INCLUDE_PATH"
+_ACEOF
+
+
 
 # Subdirectory under lib to place ImageMagick lib files
 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
@@ -32012,14 +32019,14 @@ _ACEOF
 
 
 
-# Subdirectory to place ImageMagick configuration files
+# Subdirectory to place architecture-dependent configuration files
 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
 
 cat >>confdefs.h <<_ACEOF
 #define CONFIGURE_RELATIVE_PATH "$CONFIGURE_RELATIVE_PATH"
 _ACEOF
 
-CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
+CONFIGURE_PATH="${CONFIGDIR_ARCH}/${CONFIGURE_RELATIVE_PATH}/"
 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
 case "${build_os}" in
   mingw* )
@@ -32033,7 +32040,7 @@ _ACEOF
 
 
 
-# Subdirectory to place ImageMagick configuration files
+# Subdirectory to place architecture-independent configuration files
 SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
 
 cat >>confdefs.h <<_ACEOF
index 523fc646023ce4b19b0ef0fb987276c908b431ba..7e06d43b888234d52516411f39b9e6ddcbd0cdad 100755 (executable)
@@ -385,8 +385,7 @@ AC_ARG_WITH([includedir-arch],
                     [includedir_arch=$withval],
                     [includedir_arch=$INCLUDE_DIR])
 
-AC_DEFINE_UNQUOTED(INCLUDEDIR_ARCH,"$includedir_arch",[ARCH specific include directory])
-INCLUDEDIR_ARCH="$includedir_arch"
+eval "eval INCLUDEDIR_ARCH=$includedir_arch"
 AC_SUBST(INCLUDEDIR_ARCH)
 
 #
@@ -398,7 +397,7 @@ AC_ARG_WITH([configdir-arch],
                     [configdir_arch=$withval],
                     [configdir_arch="${LIB_DIR}/${PACKAGE_NAME}-${PACKAGE_VERSION}"])
 
-AC_DEFINE_UNQUOTED(CONFIGDIR_ARCH,"$configdir_arch",[ARCH specific config directory])
+eval "eval CONFIGDIR_ARCH=$configdir_arch"
 CONFIGDIR_ARCH="$configdir_arch"
 AC_SUBST(CONFIGDIR_ARCH)
 
@@ -2873,6 +2872,17 @@ AC_SUBST(PERLMAINCC)
 #
 # Configure install Paths
 #
+# Path to ImageMagick header files
+INCLUDE_RELATIVE_PATH="ImageMagick"
+INCLUDE_PATH="${INCLUDEDIR_ARCH}/${INCLUDE_RELATIVE_PATH}"
+DEFINE_INCLUDE_PATH="${INCLUDEDIR_ARCH}/${INCLUDE_RELATIVE_PATH}/"
+case "${build_os}" in
+  mingw* )
+    DEFINE_INCLUDE_PATH=`$WinPathScript "$DEFINE_INCLUDE_PATH" 1`
+    ;;
+esac
+AC_DEFINE_UNQUOTED(INCLUDE_PATH,"$DEFINE_INCLUDE_PATH",Directory where ImageMagick headers live.)
+AC_SUBST(INCLUDE_PATH)
 
 # Subdirectory under lib to place ImageMagick lib files
 LIBRARY_RELATIVE_PATH="${PACKAGE_NAME}-${PACKAGE_VERSION}"
@@ -2941,10 +2951,10 @@ esac
 AC_DEFINE_UNQUOTED(DOCUMENTATION_PATH,"$DEFINE_DOCUMENTATION_PATH",Directory where ImageMagick documents live.)
 AC_SUBST(DOCUMENTATION_PATH)
 
-# Subdirectory to place ImageMagick configuration files
+# Subdirectory to place architecture-dependent configuration files
 CONFIGURE_RELATIVE_PATH="${PACKAGE_NAME}"
 AC_DEFINE_UNQUOTED(CONFIGURE_RELATIVE_PATH,"$CONFIGURE_RELATIVE_PATH",Subdirectory of lib where architecture-dependent configuration files live.)
-CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
+CONFIGURE_PATH="${CONFIGDIR_ARCH}/${CONFIGURE_RELATIVE_PATH}/"
 DEFINE_CONFIGURE_PATH="${SYSCONF_DIR}/${CONFIGURE_RELATIVE_PATH}/"
 case "${build_os}" in
   mingw* )
@@ -2954,7 +2964,7 @@ esac
 AC_DEFINE_UNQUOTED(CONFIGURE_PATH,"$DEFINE_CONFIGURE_PATH",Directory where architecture-dependent configuration files live.)
 AC_SUBST(CONFIGURE_PATH)
 
-# Subdirectory to place ImageMagick configuration files
+# Subdirectory to place architecture-independent configuration files
 SHARE_RELATIVE_PATH="${LIBRARY_RELATIVE_PATH}"
 AC_DEFINE_UNQUOTED(SHARE_RELATIVE_PATH,"$SHARE_RELATIVE_PATH",Subdirectory of lib where architecture-independent configuration files live.)
 SHARE_PATH="${DATA_DIR}/${SHARE_RELATIVE_PATH}"
index 8d15c0b6d24cb2c73eb999b0a94055b3c60797da..c56bb880def1b6799c1f88b4a6d8f7fcda8a9639 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 if  WITH_MAGICK_PLUS_PLUS
-magickppincdir = $(topincludedir)/Magick++
+magickppincdir = $(INCLUDE_PATH)/Magick++
 
 MAGICKPP_LIBS = Magick++/lib/libMagick++.la
 
@@ -117,7 +117,7 @@ Magick___lib_libMagick___la_SOURCES = \
        Magick++/lib/Magick++/Thread.h \
        Magick++/lib/Magick++/TypeMetric.h
 
-magickpptopincdir = $(topincludedir)
+magickpptopincdir = $(INCLUDE_PATH)
 magickpptopinc_HEADERS = \
        Magick++/lib/Magick++.h