diff --git a/MagickCore/cache-private.h b/MagickCore/cache-private.h index e76cd6688b..8990852fc0 100644 --- a/MagickCore/cache-private.h +++ b/MagickCore/cache-private.h @@ -23,6 +23,7 @@ extern "C" { #endif #include +#include "MagickCore/cache.h" #include "MagickCore/random_.h" #include "MagickCore/thread-private.h" #include "MagickCore/semaphore.h" @@ -36,9 +37,6 @@ typedef enum PingCache } CacheType; -typedef void - *Cache; - typedef MagickBooleanType (*GetOneAuthenticPixelFromHandler)(Image *,const ssize_t,const ssize_t, PixelPacket *,ExceptionInfo *), diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 0a6ba8164f..5e0200ee59 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -1959,6 +1959,7 @@ MagickExport MagickSizeType GetImageExtent(const Image *image) % o exception: return any errors or warnings in this structure. % */ + static inline MagickBooleanType ValidatePixelCacheMorphology(const Image *image) { CacheInfo @@ -1981,8 +1982,8 @@ static inline MagickBooleanType ValidatePixelCacheMorphology(const Image *image) return(MagickTrue); } -static Cache GetImagePixelCache(Image *image,const MagickBooleanType clone, - ExceptionInfo *exception) +MagickExport Cache GetImagePixelCache(Image *image, + const MagickBooleanType clone,ExceptionInfo *exception) { CacheInfo *cache_info; @@ -4277,8 +4278,7 @@ MagickExport MagickBooleanType PersistPixelCache(Image *image, (cache_info->reference_count == 1)) { LockSemaphoreInfo(cache_info->semaphore); - if ((cache_info->mode != ReadMode) && - (cache_info->type != MemoryCache) && + if ((cache_info->mode != ReadMode) && (cache_info->type != MemoryCache) && (cache_info->reference_count == 1)) { int diff --git a/MagickCore/cache.h b/MagickCore/cache.h index 2b8ed2b777..1ef87110b4 100644 --- a/MagickCore/cache.h +++ b/MagickCore/cache.h @@ -24,6 +24,12 @@ extern "C" { #include "MagickCore/blob.h" +typedef void + *Cache; + +extern MagickExport Cache + GetImagePixelCache(Image *,const MagickBooleanType,ExceptionInfo *); + extern MagickExport const Quantum *GetVirtualPixels(const Image *,const ssize_t,const ssize_t,const size_t, const size_t,ExceptionInfo *), diff --git a/MagickCore/colorspace.c b/MagickCore/colorspace.c index fde7e9365e..6468ae59c7 100644 --- a/MagickCore/colorspace.c +++ b/MagickCore/colorspace.c @@ -1192,11 +1192,12 @@ MagickExport MagickBooleanType RGBTransformImage(Image *image, MagickExport MagickBooleanType SetImageColorspace(Image *image, const ColorspaceType colorspace,ExceptionInfo *exception) { - PixelPacket - pixel; + CacheInfo + *cache_info; image->colorspace=colorspace; - return(GetOneAuthenticPixel(image,0,0,&pixel,exception)); + cache_info=GetImagePixelCache(image,MagickTrue,exception); + return(cache_info == (CacheInfo *) NULL ? MagickFalse : MagickTrue); } /* diff --git a/MagickCore/image.c b/MagickCore/image.c index 7b30771c8b..257eb23001 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -2515,12 +2515,12 @@ MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception) MagickExport MagickBooleanType SetImageAlphaChannel(Image *image, const AlphaChannelType alpha_type,ExceptionInfo *exception) { + CacheInfo + *cache_info; + MagickBooleanType status; - PixelPacket - pixel; - assert(image != (Image *) NULL); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); @@ -2666,7 +2666,8 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image, } if (status == MagickFalse) return(status); - return(GetOneAuthenticPixel(image,0,0,&pixel,exception)); + cache_info=GetImagePixelCache(image,MagickTrue,exception); + return(cache_info == (CacheInfo *) NULL ? MagickFalse : MagickTrue); } /* @@ -2876,11 +2877,12 @@ MagickExport MagickBooleanType SetImageColor(Image *image, MagickExport MagickBooleanType SetImageStorageClass(Image *image, const ClassType storage_class,ExceptionInfo *exception) { - PixelPacket - pixel; + CacheInfo + *cache_info; image->storage_class=storage_class; - return(GetOneAuthenticPixel(image,0,0,&pixel,exception)); + cache_info=GetImagePixelCache(image,MagickTrue,exception); + return(cache_info == (CacheInfo *) NULL ? MagickFalse : MagickTrue); } /* @@ -2966,14 +2968,15 @@ MagickExport MagickBooleanType SetImageClipMask(Image *image, MagickExport MagickBooleanType SetImageExtent(Image *image,const size_t columns, const size_t rows,ExceptionInfo *exception) { - PixelPacket - pixel; + CacheInfo + *cache_info; if ((columns == 0) || (rows == 0)) return(MagickFalse); image->columns=columns; image->rows=rows; - return(GetOneAuthenticPixel(image,0,0,&pixel,exception)); + cache_info=GetImagePixelCache(image,MagickTrue,exception); + return(cache_info == (CacheInfo *) NULL ? MagickFalse : MagickTrue); } /* diff --git a/index.html b/index.html index f00fca87a0..4e18eadb2b 100644 --- a/index.html +++ b/index.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/ImageMagickObject.html b/www/ImageMagickObject.html index b3682a2805..6c82e0c1da 100644 --- a/www/ImageMagickObject.html +++ b/www/ImageMagickObject.html @@ -158,14 +158,14 @@ Sponsors: - [sponsor]
diff --git a/www/advanced-unix-installation.html b/www/advanced-unix-installation.html index c16f8d6e25..e652822d29 100644 --- a/www/advanced-unix-installation.html +++ b/www/advanced-unix-installation.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
@@ -237,7 +240,7 @@

The configure script looks at your environment and decides what it can cobble together to get ImageMagick compiled and installed on your system. This includes finding a compiler, where your compiler header files are located (e.g. stdlib.h), and if any delegate libraries are available for ImageMagick to use (e.g. JPEG, PNG, TIFF, etc.). If you are willing to accept configure's default options, and build from within the source directory, you can simply type:

-

$magick> cd ImageMagick-6.7.1-2 $magick> ./configure

+

$magick> cd ImageMagick-6.7.1-3 $magick> ./configure

Watch the configure script output to verify that it finds everything that you think it should. Pay particular attention to the last lines of the script output. For example, here is a recent report from our system:

@@ -589,7 +592,7 @@ Options used to compile and link:

Download the ImageMagick source distribution and verify the distribution against its message digest.

Unpack and change into the top-level ImageMagick directory:

-

$magick> tar xvfz ImageMagick-6.7.1-2.tar.gz $magick> cd ImageMagick-6.7.1-2

Configure ImageMagick:

+

$magick> tar xvfz ImageMagick-6.7.1-3.tar.gz $magick> cd ImageMagick-6.7.1-3

Configure ImageMagick:

$magick> ./configure --prefix=/opt --with-quantum-depth=16 \
--disable-dependency-tracking --with-x=yes \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib/ \
@@ -609,7 +612,7 @@ Options used to compile and link:

Although you can download and install delegate libraries yourself, many are already available in the GnuWin32 distribution. Download and install whichever delegate libraries you require such as JPEG, PNG, TIFF, etc. Make sure you specify the development headers when you install a package. Next type,

-

$magick> tar jxvf ImageMagick-6.7.1-?.tar.bz2 $magick> cd ImageMagick-6.7.1-2 $magick> export CPPFLAGS="-Ic:/Progra~1/GnuWin32/include" $magick> export LDFLAGS="-Lc:/Progra~1/GnuWin32/lib" $magick> ./configure --without-perl $magick> make $magick> sudo make install

+

$magick> tar jxvf ImageMagick-6.7.1-?.tar.bz2 $magick> cd ImageMagick-6.7.1-3 $magick> export CPPFLAGS="-Ic:/Progra~1/GnuWin32/include" $magick> export LDFLAGS="-Lc:/Progra~1/GnuWin32/lib" $magick> ./configure --without-perl $magick> make $magick> sudo make install

Dealing with Unexpected Problems

diff --git a/www/advanced-windows-installation.html b/www/advanced-windows-installation.html index 6f87ffdb9a..e27622e546 100644 --- a/www/advanced-windows-installation.html +++ b/www/advanced-windows-installation.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
@@ -489,7 +492,7 @@
  1. Double-click on - VisualMagick/bin/ImageMagick-6.7.1-2-Q16-windows-dll.exe + VisualMagick/bin/ImageMagick-6.7.1-3-Q16-windows-dll.exe to launch the ImageMagick binary distribution.
  2. Complete the installer screens to install ImageMagick on your system.
diff --git a/www/animate.html b/www/animate.html index b66cf40047..4b2a7655b5 100644 --- a/www/animate.html +++ b/www/animate.html @@ -158,14 +158,14 @@ Sponsors: - [sponsor]
diff --git a/www/api.html b/www/api.html index 2eb6e45c5f..3dab60e93c 100644 --- a/www/api.html +++ b/www/api.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/animate.html b/www/api/animate.html index dfcae668ac..c9837a7bd1 100644 --- a/www/api/animate.html +++ b/www/api/animate.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/annotate.html b/www/api/annotate.html index 3374dcc1d9..84df1fe675 100644 --- a/www/api/annotate.html +++ b/www/api/annotate.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/attribute.html b/www/api/attribute.html index 32e130fb05..d6e085dee5 100644 --- a/www/api/attribute.html +++ b/www/api/attribute.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/blob.html b/www/api/blob.html index 3d9c9650d6..77c61507a1 100644 --- a/www/api/blob.html +++ b/www/api/blob.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/cache-view.html b/www/api/cache-view.html index f05aec2680..c8b51f05bc 100644 --- a/www/api/cache-view.html +++ b/www/api/cache-view.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/cache.html b/www/api/cache.html index 7b54570fab..b664f6787c 100644 --- a/www/api/cache.html +++ b/www/api/cache.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/cipher.html b/www/api/cipher.html index 8abe350a93..6715700e0b 100644 --- a/www/api/cipher.html +++ b/www/api/cipher.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/colormap.html b/www/api/colormap.html index 433a5c3529..f6e3b343ee 100644 --- a/www/api/colormap.html +++ b/www/api/colormap.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/compare.html b/www/api/compare.html index 8cf5d19ca6..39f3479013 100644 --- a/www/api/compare.html +++ b/www/api/compare.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/composite.html b/www/api/composite.html index 9d1b06d5c8..d6326b8f8c 100644 --- a/www/api/composite.html +++ b/www/api/composite.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/constitute.html b/www/api/constitute.html index 0aef579a5c..7787e21679 100644 --- a/www/api/constitute.html +++ b/www/api/constitute.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/deprecate.html b/www/api/deprecate.html index f8c20c41e6..8fcca967be 100644 --- a/www/api/deprecate.html +++ b/www/api/deprecate.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/display.html b/www/api/display.html index 5ed6b2264c..878c09fe38 100644 --- a/www/api/display.html +++ b/www/api/display.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/distort.html b/www/api/distort.html index 736be4c18e..e3e18fac7e 100644 --- a/www/api/distort.html +++ b/www/api/distort.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/drawing-wand.html b/www/api/drawing-wand.html index 414f7a7f7c..500fe7cdcb 100644 --- a/www/api/drawing-wand.html +++ b/www/api/drawing-wand.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/effect.html b/www/api/effect.html index 67cee14ed4..511875226b 100644 --- a/www/api/effect.html +++ b/www/api/effect.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/enhance.html b/www/api/enhance.html index c8d35eee6a..2affa121ff 100644 --- a/www/api/enhance.html +++ b/www/api/enhance.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/exception.html b/www/api/exception.html index 09c74786c7..b74bc3333c 100644 --- a/www/api/exception.html +++ b/www/api/exception.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/feature.html b/www/api/feature.html index 4803634b68..a029ddda28 100644 --- a/www/api/feature.html +++ b/www/api/feature.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/fourier.html b/www/api/fourier.html index 0eb31d2038..79290f3958 100644 --- a/www/api/fourier.html +++ b/www/api/fourier.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/fx.html b/www/api/fx.html index 41ba876b10..cae15d1e1c 100644 --- a/www/api/fx.html +++ b/www/api/fx.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/image-view.html b/www/api/image-view.html index cd334cfd08..d4f22f6f8b 100644 --- a/www/api/image-view.html +++ b/www/api/image-view.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/image.html b/www/api/image.html index 2b6c93b62e..4379072fbe 100644 --- a/www/api/image.html +++ b/www/api/image.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
@@ -774,7 +777,7 @@
   MagickBooleanType SetImageAlphaChannel(Image *image,
-    const AlphaChannelType alpha_type)
+    const AlphaChannelType alpha_type,ExceptionInfo *exception)
 

A description of each parameter follows:

@@ -785,6 +788,10 @@
alpha_type

The alpha channel type: ActivateAlphaChannel, CopyAlphaChannel, DeactivateAlphaChannel, ExtractAlphaChannel, OpaqueAlphaChannel, SetAlphaChannel, ShapeAlphaChannel, and TransparentAlphaChannel.

+
exception
+

return any errors or warnings in this structure.

+ +

SetImageBackgroundColor

@@ -832,7 +839,7 @@
   MagickBooleanType SetImageStorageClass(Image *image,
-    const ClassType storage_class)
+    const ClassType storage_class,ExceptionInfo *exception)
 

A description of each parameter follows:

@@ -843,6 +850,9 @@
storage_class

The image class.

+
exception
+

return any errors or warnings in this structure.

+

SetImageClipMask

@@ -873,7 +883,7 @@
   MagickBooleanType SetImageExtent(Image *image,const size_t columns,
-    const size_t rows)
+    const size_t rows,ExceptionInfo *exception)
 

A description of each parameter follows:

@@ -887,6 +897,9 @@
rows

The image height in pixels.

+
exception
+

return any errors or warnings in this structure.

+

SetImageInfoBlob

diff --git a/www/api/layer.html b/www/api/layer.html index 6dc078bd0a..bc6c14395c 100644 --- a/www/api/layer.html +++ b/www/api/layer.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/list.html b/www/api/list.html index ff40c1bbf4..cf6750f6f4 100644 --- a/www/api/list.html +++ b/www/api/list.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/magick-image.html b/www/api/magick-image.html index b8e30bb75c..f6bce5999e 100644 --- a/www/api/magick-image.html +++ b/www/api/magick-image.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/magick-property.html b/www/api/magick-property.html index dec90a2373..8d070375cb 100644 --- a/www/api/magick-property.html +++ b/www/api/magick-property.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/magick-wand.html b/www/api/magick-wand.html index 37316dbf2e..0657856f49 100644 --- a/www/api/magick-wand.html +++ b/www/api/magick-wand.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/magick.html b/www/api/magick.html index f32bc7f4a9..3e69c1c43d 100644 --- a/www/api/magick.html +++ b/www/api/magick.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/memory.html b/www/api/memory.html index 582efac265..82132e1a81 100644 --- a/www/api/memory.html +++ b/www/api/memory.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/module.html b/www/api/module.html index e1e13865a0..743429de94 100644 --- a/www/api/module.html +++ b/www/api/module.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/mogrify.html b/www/api/mogrify.html index c5ab4023e3..6829008ab1 100644 --- a/www/api/mogrify.html +++ b/www/api/mogrify.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/monitor.html b/www/api/monitor.html index 341ff21ebb..fc2ce48425 100644 --- a/www/api/monitor.html +++ b/www/api/monitor.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/montage.html b/www/api/montage.html index 9b19c59072..f564c429cb 100644 --- a/www/api/montage.html +++ b/www/api/montage.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/api/version.html b/www/api/version.html index 25bc21b35f..bfd6257631 100644 --- a/www/api/version.html +++ b/www/api/version.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
diff --git a/www/architecture.html b/www/architecture.html index 0c6baa7b46..4096d2b54b 100644 --- a/www/architecture.html +++ b/www/architecture.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
@@ -304,7 +307,7 @@

When the pixel cache is initialized, pixels are scaled from whatever bit depth they originated from to that required by the pixel cache. For example, a 1-channel 1-bit monochrome PBM image is scaled to a 4 channel 8-bit RGBA image, if you are using the Q8 version of ImageMagick, and 16-bit RGBA for the Q16 version. You can determine which version you have with the ‑version option:

-

$magick> identify -versionVersion: ImageMagick 6.7.1-2 2011-07-01 Q16 http://www.imagemagick.org

+

$magick> identify -versionVersion: ImageMagick 6.7.1-3 2011-07-01 Q16 http://www.imagemagick.org

As you can see, the convenience of the pixel cache sometimes comes with a trade-off in storage (e.g. storing a 1-bit monochrome image as 16-bit RGBA is wasteful) and speed (i.e. storing the entire image in memory is generally slower than accessing one scanline of pixels at a time). In most cases, the benefits of the pixel cache typically outweigh any disadvantages.

diff --git a/www/binary-releases.html b/www/binary-releases.html index 3fa791fd88..28fb3f5923 100644 --- a/www/binary-releases.html +++ b/www/binary-releases.html @@ -157,14 +157,14 @@ Sponsors: - [sponsor]
@@ -235,16 +238,16 @@ - ImageMagick-6.7.1-2.i386.rpm - download - download + ImageMagick-6.7.1-3.i386.rpm + download + download CentOS 5.4 i386 RPM - ImageMagick-6.7.1-2.x86_64.rpm - download - download + ImageMagick-6.7.1-3.x86_64.rpm + download + download CentOS 5.4 x86_64 RPM @@ -281,7 +284,7 @@

ImageMagick RPM's are self-installing. Simply type the following command and you're ready to start using ImageMagick:

-

$magick> rpm -Uvh ImageMagick-6.7.1-2.i386.rpm

+

$magick> rpm -Uvh ImageMagick-6.7.1-3.i386.rpm

For other systems, create (or choose) a directory to install the package into and change to that directory, for example:

$magick> cd $HOME

@@ -381,7 +384,7 @@
 	./imagemagick_compile.sh VERSION
 
-

where VERSION is the version of ImageMagick you want to compile (i.e.: 6.7.1-2, svn, ...)

+

where VERSION is the version of ImageMagick you want to compile (i.e.: 6.7.1-3, svn, ...)

This script compiles ImageMagick as a static library to be included in iOS projects and adds support for