magick/geometry.c magick/geometry.h magick/hashmap.c \
magick/hashmap.h magick/histogram.c magick/histogram.h \
magick/identify.c magick/identify.h magick/image.c \
- magick/image.h magick/image-private.h magick/layer.c \
- magick/layer.h magick/list.c magick/list.h magick/locale.c \
- magick/locale_.h magick/log.c magick/log.h magick/mac.h \
- magick/magic.c magick/magic.h magick/magick.c \
- magick/magick-config.h magick/magick-type.h magick/magick.h \
- magick/matrix.c magick/matrix.h magick/memory.c \
- magick/memory_.h magick/methods.h magick/mime.c magick/mime.h \
- magick/module.c magick/module.h magick/monitor.c \
- magick/monitor.h magick/monitor-private.h magick/montage.c \
- magick/montage.h magick/morphology.c magick/morphology.h \
+ magick/image.h magick/image-private.h magick/image-view.c \
+ magick/image-view.h magick/layer.c magick/layer.h \
+ magick/list.c magick/list.h magick/locale.c magick/locale_.h \
+ magick/log.c magick/log.h magick/mac.h magick/magic.c \
+ magick/magic.h magick/magick.c magick/magick-config.h \
+ magick/magick-type.h magick/magick.h magick/matrix.c \
+ magick/matrix.h magick/memory.c magick/memory_.h \
+ magick/methods.h magick/mime.c magick/mime.h magick/module.c \
+ magick/module.h magick/monitor.c magick/monitor.h \
+ magick/monitor-private.h magick/montage.c magick/montage.h \
+ magick/morphology.c magick/morphology.h \
magick/morphology-private.h magick/nt-base.h \
magick/nt-feature.h magick/option.c magick/option.h \
magick/paint.c magick/paint.h magick/pixel.c magick/pixel.h \
magick/magick_libMagickCore_la-histogram.lo \
magick/magick_libMagickCore_la-identify.lo \
magick/magick_libMagickCore_la-image.lo \
+ magick/magick_libMagickCore_la-image-view.lo \
magick/magick_libMagickCore_la-layer.lo \
magick/magick_libMagickCore_la-list.lo \
magick/magick_libMagickCore_la-locale.lo \
wand/wand_libMagickWand_la-mogrify.lo \
wand/wand_libMagickWand_la-montage.lo \
wand/wand_libMagickWand_la-pixel-iterator.lo \
- wand/wand_libMagickWand_la-pixel-view.lo \
wand/wand_libMagickWand_la-pixel-wand.lo \
wand/wand_libMagickWand_la-stream.lo \
- wand/wand_libMagickWand_la-wand.lo
+ wand/wand_libMagickWand_la-wand.lo \
+ wand/wand_libMagickWand_la-wand-view.lo
am_wand_libMagickWand_la_OBJECTS = $(am__objects_18)
wand_libMagickWand_la_OBJECTS = $(am_wand_libMagickWand_la_OBJECTS)
wand_libMagickWand_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
magick/image.c \
magick/image.h \
magick/image-private.h \
+ magick/image-view.c \
+ magick/image-view.h \
magick/layer.c \
magick/layer.h \
magick/list.c \
magick/histogram.h \
magick/identify.h \
magick/image.h \
+ magick/image-view.h \
magick/layer.h \
magick/list.h \
magick/locale_.h \
wand/montage.h \
wand/pixel-iterator.c \
wand/pixel-iterator.h \
- wand/pixel-view.c \
- wand/pixel-view.h \
wand/pixel-wand.c \
wand/pixel-wand.h \
wand/pixel-wand-private.h \
wand/stream.h \
wand/studio.h \
wand/wand.c \
- wand/wand.h
+ wand/wand.h \
+ wand/wand-view.c \
+ wand/wand-view.h
WAND_INCLUDE_HDRS = \
wand/MagickWand.h \
magick/$(DEPDIR)/$(am__dirstamp)
magick/magick_libMagickCore_la-image.lo: magick/$(am__dirstamp) \
magick/$(DEPDIR)/$(am__dirstamp)
+magick/magick_libMagickCore_la-image-view.lo: magick/$(am__dirstamp) \
+ magick/$(DEPDIR)/$(am__dirstamp)
magick/magick_libMagickCore_la-layer.lo: magick/$(am__dirstamp) \
magick/$(DEPDIR)/$(am__dirstamp)
magick/magick_libMagickCore_la-list.lo: magick/$(am__dirstamp) \
wand/$(DEPDIR)/$(am__dirstamp)
wand/wand_libMagickWand_la-pixel-iterator.lo: wand/$(am__dirstamp) \
wand/$(DEPDIR)/$(am__dirstamp)
-wand/wand_libMagickWand_la-pixel-view.lo: wand/$(am__dirstamp) \
- wand/$(DEPDIR)/$(am__dirstamp)
wand/wand_libMagickWand_la-pixel-wand.lo: wand/$(am__dirstamp) \
wand/$(DEPDIR)/$(am__dirstamp)
wand/wand_libMagickWand_la-stream.lo: wand/$(am__dirstamp) \
wand/$(DEPDIR)/$(am__dirstamp)
wand/wand_libMagickWand_la-wand.lo: wand/$(am__dirstamp) \
wand/$(DEPDIR)/$(am__dirstamp)
+wand/wand_libMagickWand_la-wand-view.lo: wand/$(am__dirstamp) \
+ wand/$(DEPDIR)/$(am__dirstamp)
wand/libMagickWand.la: $(wand_libMagickWand_la_OBJECTS) $(wand_libMagickWand_la_DEPENDENCIES) wand/$(am__dirstamp)
$(AM_V_CCLD)$(wand_libMagickWand_la_LINK) -rpath $(libdir) $(wand_libMagickWand_la_OBJECTS) $(wand_libMagickWand_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
-rm -f magick/magick_libMagickCore_la-histogram.lo
-rm -f magick/magick_libMagickCore_la-identify.$(OBJEXT)
-rm -f magick/magick_libMagickCore_la-identify.lo
+ -rm -f magick/magick_libMagickCore_la-image-view.$(OBJEXT)
+ -rm -f magick/magick_libMagickCore_la-image-view.lo
-rm -f magick/magick_libMagickCore_la-image.$(OBJEXT)
-rm -f magick/magick_libMagickCore_la-image.lo
-rm -f magick/magick_libMagickCore_la-layer.$(OBJEXT)
-rm -f wand/wand_libMagickWand_la-montage.lo
-rm -f wand/wand_libMagickWand_la-pixel-iterator.$(OBJEXT)
-rm -f wand/wand_libMagickWand_la-pixel-iterator.lo
- -rm -f wand/wand_libMagickWand_la-pixel-view.$(OBJEXT)
- -rm -f wand/wand_libMagickWand_la-pixel-view.lo
-rm -f wand/wand_libMagickWand_la-pixel-wand.$(OBJEXT)
-rm -f wand/wand_libMagickWand_la-pixel-wand.lo
-rm -f wand/wand_libMagickWand_la-stream.$(OBJEXT)
-rm -f wand/wand_libMagickWand_la-stream.lo
+ -rm -f wand/wand_libMagickWand_la-wand-view.$(OBJEXT)
+ -rm -f wand/wand_libMagickWand_la-wand-view.lo
-rm -f wand/wand_libMagickWand_la-wand.$(OBJEXT)
-rm -f wand/wand_libMagickWand_la-wand.lo
-rm -f wand/wandtest.$(OBJEXT)
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_la-hashmap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_la-histogram.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_la-identify.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_la-image-view.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_la-image.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_la-layer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@magick/$(DEPDIR)/magick_libMagickCore_la-list.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wand_libMagickWand_la-mogrify.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wand_libMagickWand_la-montage.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wand_libMagickWand_la-pixel-iterator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wand_libMagickWand_la-pixel-view.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wand_libMagickWand_la-pixel-wand.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wand_libMagickWand_la-stream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wand_libMagickWand_la-wand-view.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wand_libMagickWand_la-wand.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@wand/$(DEPDIR)/wandtest.Po@am__quote@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libMagickCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o magick/magick_libMagickCore_la-image.lo `test -f 'magick/image.c' || echo '$(srcdir)/'`magick/image.c
+magick/magick_libMagickCore_la-image-view.lo: magick/image-view.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libMagickCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT magick/magick_libMagickCore_la-image-view.lo -MD -MP -MF magick/$(DEPDIR)/magick_libMagickCore_la-image-view.Tpo -c -o magick/magick_libMagickCore_la-image-view.lo `test -f 'magick/image-view.c' || echo '$(srcdir)/'`magick/image-view.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) magick/$(DEPDIR)/magick_libMagickCore_la-image-view.Tpo magick/$(DEPDIR)/magick_libMagickCore_la-image-view.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='magick/image-view.c' object='magick/magick_libMagickCore_la-image-view.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libMagickCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o magick/magick_libMagickCore_la-image-view.lo `test -f 'magick/image-view.c' || echo '$(srcdir)/'`magick/image-view.c
+
magick/magick_libMagickCore_la-layer.lo: magick/layer.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(magick_libMagickCore_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT magick/magick_libMagickCore_la-layer.lo -MD -MP -MF magick/$(DEPDIR)/magick_libMagickCore_la-layer.Tpo -c -o magick/magick_libMagickCore_la-layer.lo `test -f 'magick/layer.c' || echo '$(srcdir)/'`magick/layer.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) magick/$(DEPDIR)/magick_libMagickCore_la-layer.Tpo magick/$(DEPDIR)/magick_libMagickCore_la-layer.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(wand_libMagickWand_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wand/wand_libMagickWand_la-pixel-iterator.lo `test -f 'wand/pixel-iterator.c' || echo '$(srcdir)/'`wand/pixel-iterator.c
-wand/wand_libMagickWand_la-pixel-view.lo: wand/pixel-view.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(wand_libMagickWand_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wand/wand_libMagickWand_la-pixel-view.lo -MD -MP -MF wand/$(DEPDIR)/wand_libMagickWand_la-pixel-view.Tpo -c -o wand/wand_libMagickWand_la-pixel-view.lo `test -f 'wand/pixel-view.c' || echo '$(srcdir)/'`wand/pixel-view.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wand/$(DEPDIR)/wand_libMagickWand_la-pixel-view.Tpo wand/$(DEPDIR)/wand_libMagickWand_la-pixel-view.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wand/pixel-view.c' object='wand/wand_libMagickWand_la-pixel-view.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(wand_libMagickWand_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wand/wand_libMagickWand_la-pixel-view.lo `test -f 'wand/pixel-view.c' || echo '$(srcdir)/'`wand/pixel-view.c
-
wand/wand_libMagickWand_la-pixel-wand.lo: wand/pixel-wand.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(wand_libMagickWand_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wand/wand_libMagickWand_la-pixel-wand.lo -MD -MP -MF wand/$(DEPDIR)/wand_libMagickWand_la-pixel-wand.Tpo -c -o wand/wand_libMagickWand_la-pixel-wand.lo `test -f 'wand/pixel-wand.c' || echo '$(srcdir)/'`wand/pixel-wand.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wand/$(DEPDIR)/wand_libMagickWand_la-pixel-wand.Tpo wand/$(DEPDIR)/wand_libMagickWand_la-pixel-wand.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(wand_libMagickWand_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wand/wand_libMagickWand_la-wand.lo `test -f 'wand/wand.c' || echo '$(srcdir)/'`wand/wand.c
+wand/wand_libMagickWand_la-wand-view.lo: wand/wand-view.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(wand_libMagickWand_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT wand/wand_libMagickWand_la-wand-view.lo -MD -MP -MF wand/$(DEPDIR)/wand_libMagickWand_la-wand-view.Tpo -c -o wand/wand_libMagickWand_la-wand-view.lo `test -f 'wand/wand-view.c' || echo '$(srcdir)/'`wand/wand-view.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) wand/$(DEPDIR)/wand_libMagickWand_la-wand-view.Tpo wand/$(DEPDIR)/wand_libMagickWand_la-wand-view.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wand/wand-view.c' object='wand/wand_libMagickWand_la-wand-view.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(wand_libMagickWand_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o wand/wand_libMagickWand_la-wand-view.lo `test -f 'wand/wand-view.c' || echo '$(srcdir)/'`wand/wand-view.c
+
tests/tests_validate-validate.o: tests/validate.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_validate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tests_validate-validate.o -MD -MP -MF tests/$(DEPDIR)/tests_validate-validate.Tpo -c -o tests/tests_validate-validate.o `test -f 'tests/validate.c' || echo '$(srcdir)/'`tests/validate.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_validate-validate.Tpo tests/$(DEPDIR)/tests_validate-validate.Po
<configure name="NAME" value="ImageMagick"/>
<configure name="LIB_VERSION" value="0x662"/>
<configure name="LIB_VERSION_NUMBER" value="6,6,2,9"/>
- <configure name="RELEASE_DATE" value="2010-06-25"/>
+ <configure name="RELEASE_DATE" value="2010-06-26"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
#include "magick/histogram.h"
#include "magick/identify.h"
#include "magick/image.h"
+#include "magick/image-view.h"
#include "magick/layer.h"
#include "magick/list.h"
#include "magick/locale_.h"
$call Make histogram.c
$call Make identify.c
$call Make image.c
+$call Make image-view.c
$call Make layer.c
$call Make list.c
$call Make locale.c
cipher, client, coder, color, colormap, colorspace, compare, composite, -
compress, configure, constitute, decorate, delegate, deprecate, display, -
distort, draw, effect, enhance, exception, feature, fourier, fx, gem, -
- geometry, hashmap, histogram, identify, image, layer, list, locale, log, -
- magic, magick, matrix, memory, mime, module, monitor, montage, morphology, -
- option, paint, pixel, PreRvIcccm, profile, quantize, quantum, -
+ geometry, hashmap, histogram, identify, image, image-view, layer, list, -
+ locale, log, magic, magick, matrix, memory, mime, module, monitor, montage, -
+ morphology, option, paint, pixel, PreRvIcccm, profile, quantize, quantum, -
quantum-export, quantum-import,random, registry, resample, resize, resource, -
segment, semaphore, shear, signature, splay-tree, static, stream, string, -
thread, timer, token, transform, threshold, type, utility, version, vms, -
magick/image.c \
magick/image.h \
magick/image-private.h \
+ magick/image-view.c \
+ magick/image-view.h \
magick/layer.c \
magick/layer.h \
magick/list.c \
magick/histogram.h \
magick/identify.h \
magick/image.h \
+ magick/image-view.h \
magick/layer.h \
magick/list.h \
magick/locale_.h \
--- /dev/null
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% IIIII M M AAA GGGG EEEEE %
+% I MM MM A A G E %
+% I M M M AAAAA G GG EEE %
+% I M M A A G G E %
+% IIIII M M A A GGGG EEEEE %
+% %
+% V V IIIII EEEEE W W %
+% V V I E W W %
+% V V I EEE W W W %
+% V V I E WW WW %
+% V IIIII EEEEE W W %
+% %
+% %
+% MagickCore Image View Methods %
+% %
+% Software Design %
+% John Cristy %
+% March 2003 %
+% %
+% %
+% Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
+% dedicated to making software imaging solutions freely available. %
+% %
+% You may not use this file except in compliance with the License. You may %
+% obtain a copy of the License at %
+% %
+% http://www.imagemagick.org/script/license.php %
+% %
+% Unless required by applicable law or agreed to in writing, software %
+% distributed under the License is distributed on an "AS IS" BASIS, %
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
+% See the License for the specific language governing permissions and %
+% limitations under the License. %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+%
+*/
+\f
+/*
+ Include declarations.
+*/
+#include "magick/studio.h"
+#include "magick/MagickCore.h"
+#include "magick/exception-private.h"
+#include "magick/monitor-private.h"
+#include "magick/thread-private.h"
+\f
+/*
+ Typedef declarations.
+*/
+struct _ImageView
+{
+ ExceptionInfo
+ *exception;
+
+ Image
+ *image;
+
+ CacheView
+ *view;
+
+ RectangleInfo
+ region;
+
+ size_t
+ number_threads;
+
+ MagickBooleanType
+ debug;
+
+ size_t
+ signature;
+};
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% C l o n e I m a g e V i e w %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% CloneImageView() makes a copy of the specified pixel view.
+%
+% The format of the CloneImageView method is:
+%
+% ImageView *CloneImageView(const ImageView *pixel_view)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+*/
+MagickExport ImageView *CloneImageView(const ImageView *pixel_view)
+{
+ ImageView
+ *clone_view;
+
+ assert(pixel_view != (ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ clone_view=(ImageView *) AcquireAlignedMemory(1,sizeof(*clone_view));
+ if (clone_view == (ImageView *) NULL)
+ ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ (void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
+ clone_view->exception=AcquireExceptionInfo();
+ InheritException(clone_view->exception,pixel_view->exception);
+ clone_view->view=CloneCacheView(pixel_view->view);
+ clone_view->region=pixel_view->region;
+ clone_view->number_threads=pixel_view->number_threads;
+ clone_view->debug=pixel_view->debug;
+ clone_view->signature=MagickSignature;
+ return(clone_view);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% D e s t r o y I m a g e V i e w %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DestroyImageView() deallocates memory associated with a pixel view.
+%
+% The format of the DestroyImageView method is:
+%
+% ImageView *DestroyImageView(ImageView *pixel_view,
+% const size_t number_wands,const size_t number_threads)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+% o number_wand: the number of pixel wands.
+%
+% o number_threads: number of threads.
+%
+*/
+MagickExport ImageView *DestroyImageView(ImageView *pixel_view)
+{
+ assert(pixel_view != (ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ pixel_view->view=DestroyCacheView(pixel_view->view);
+ pixel_view->exception=DestroyExceptionInfo(pixel_view->exception);
+ pixel_view->signature=(~MagickSignature);
+ pixel_view=(ImageView *) RelinquishMagickMemory(pixel_view);
+ return(pixel_view);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% D u p l e x T r a n s f e r I m a g e V i e w I t e r a t o r %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DuplexTransferImageViewIterator() iterates over three pixel views in
+% parallel and calls your transfer method for each scanline of the view. The
+% source and duplex pixel region is not confined to the image canvas-- that is
+% you can include negative offsets or widths or heights that exceed the image
+% dimension. However, the destination pixel view is confined to the image
+% canvas-- that is no negative offsets or widths or heights that exceed the
+% image dimension are permitted.
+%
+% Use this pragma:
+%
+% #pragma omp critical
+%
+% to define a section of code in your callback transfer method that must be
+% executed by a single thread at a time.
+%
+% The format of the DuplexTransferImageViewIterator method is:
+%
+% MagickBooleanType DuplexTransferImageViewIterator(ImageView *source,
+% ImageView *duplex,ImageView *destination,
+% DuplexTransferImageViewMethod transfer,void *context)
+%
+% A description of each parameter follows:
+%
+% o source: the source pixel view.
+%
+% o duplex: the duplex pixel view.
+%
+% o destination: the destination pixel view.
+%
+% o transfer: the transfer callback method.
+%
+% o context: the user defined context.
+%
+*/
+MagickExport MagickBooleanType DuplexTransferImageViewIterator(
+ ImageView *source,ImageView *duplex,ImageView *destination,
+ DuplexTransferImageViewMethod transfer,void *context)
+{
+#define DuplexTransferImageViewTag "ImageView/DuplexTransfer"
+
+ ExceptionInfo
+ *exception;
+
+ Image
+ *destination_image,
+ *duplex_image,
+ *source_image;
+
+ MagickBooleanType
+ status;
+
+ MagickOffsetType
+ progress;
+
+ ssize_t
+ y;
+
+ assert(source != (ImageView *) NULL);
+ assert(source->signature == MagickSignature);
+ if (transfer == (DuplexTransferImageViewMethod) NULL)
+ return(MagickFalse);
+ source_image=source->image;
+ duplex_image=duplex->image;
+ destination_image=destination->image;
+ if (SetImageStorageClass(destination_image,DirectClass) == MagickFalse)
+ return(MagickFalse);
+ status=MagickTrue;
+ progress=0;
+ exception=destination->exception;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(static,1) shared(progress,status)
+#endif
+ for (y=source->region.y; y < (ssize_t) source->region.height; y++)
+ {
+ MagickBooleanType
+ sync;
+
+ register const IndexPacket
+ *restrict duplex_indexes,
+ *restrict indexes;
+
+ register const PixelPacket
+ *restrict duplex_pixels,
+ *restrict pixels;
+
+ register IndexPacket
+ *restrict destination_indexes;
+
+ register ssize_t
+ id,
+ x;
+
+ register PixelPacket
+ *restrict destination_pixels;
+
+ if (status == MagickFalse)
+ continue;
+ id=GetOpenMPThreadId();
+ pixels=GetCacheViewVirtualPixels(source->view,source->region.x,y,
+ source->region.width,1,source->exception);
+ if (pixels == (const PixelPacket *) NULL)
+ {
+ status=MagickFalse;
+ continue;
+ }
+ indexes=GetCacheViewVirtualIndexQueue(source->view);
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (source_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (source_image->storage_class == PseudoClass)
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ duplex_pixels=GetCacheViewVirtualPixels(duplex->view,duplex->region.x,y,
+ duplex->region.width,1,duplex->exception);
+ if (duplex_pixels == (const PixelPacket *) NULL)
+ {
+ status=MagickFalse;
+ continue;
+ }
+ duplex_indexes=GetCacheViewVirtualIndexQueue(duplex->view);
+ for (x=0; x < (ssize_t) duplex->region.width; x++)
+ ;
+ if (duplex_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) duplex->region.width; x++)
+ ;
+ if (duplex_image->storage_class == PseudoClass)
+ for (x=0; x < (ssize_t) duplex->region.width; x++)
+ ;
+ destination_pixels=GetCacheViewAuthenticPixels(destination->view,
+ destination->region.x,y,destination->region.width,1,exception);
+ if (destination_pixels == (PixelPacket *) NULL)
+ {
+ status=MagickFalse;
+ continue;
+ }
+ destination_indexes=GetCacheViewAuthenticIndexQueue(destination->view);
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (destination_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (destination_image->storage_class == PseudoClass)
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (transfer(source,duplex,destination,context) == MagickFalse)
+ status=MagickFalse;
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (destination_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ sync=SyncCacheViewAuthenticPixels(destination->view,exception);
+ if (sync == MagickFalse)
+ {
+ InheritException(destination->exception,GetCacheViewException(
+ source->view));
+ status=MagickFalse;
+ }
+ if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
+ {
+ MagickBooleanType
+ proceed;
+
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp critical (MagickCore_DuplexTransferImageViewIterator)
+#endif
+ proceed=SetImageProgress(source_image,DuplexTransferImageViewTag,
+ progress++,source->region.height);
+ if (proceed == MagickFalse)
+ status=MagickFalse;
+ }
+ }
+ return(status);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% G e t I m a g e V i e w E x c e p t i o n %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GetImageViewException() returns the severity, reason, and description of any
+% error that occurs when utilizing a pixel view.
+%
+% The format of the GetImageViewException method is:
+%
+% char *GetImageViewException(const PixelImage *pixel_view,
+% ExceptionType *severity)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel pixel_view.
+%
+% o severity: the severity of the error is returned here.
+%
+*/
+MagickExport char *GetImageViewException(const ImageView *pixel_view,
+ ExceptionType *severity)
+{
+ char
+ *description;
+
+ assert(pixel_view != (const ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ assert(severity != (ExceptionType *) NULL);
+ *severity=pixel_view->exception->severity;
+ description=(char *) AcquireQuantumMemory(2UL*MaxTextExtent,
+ sizeof(*description));
+ if (description == (char *) NULL)
+ ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ *description='\0';
+ if (pixel_view->exception->reason != (char *) NULL)
+ (void) CopyMagickString(description,GetLocaleExceptionMessage(
+ pixel_view->exception->severity,pixel_view->exception->reason),
+ MaxTextExtent);
+ if (pixel_view->exception->description != (char *) NULL)
+ {
+ (void) ConcatenateMagickString(description," (",MaxTextExtent);
+ (void) ConcatenateMagickString(description,GetLocaleExceptionMessage(
+ pixel_view->exception->severity,pixel_view->exception->description),
+ MaxTextExtent);
+ (void) ConcatenateMagickString(description,")",MaxTextExtent);
+ }
+ return(description);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% G e t I m a g e V i e w H e i g h t %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GetImageViewHeight() returns the pixel view height.
+%
+% The format of the GetImageViewHeight method is:
+%
+% size_t GetImageViewHeight(const ImageView *pixel_view)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+*/
+MagickExport size_t GetImageViewHeight(const ImageView *pixel_view)
+{
+ assert(pixel_view != (ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ return(pixel_view->region.height);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% G e t I m a g e V i e w I t e r a t o r %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GetImageViewIterator() iterates over the pixel view in parallel and calls
+% your get method for each scanline of the view. The pixel region is
+% not confined to the image canvas-- that is you can include negative offsets
+% or widths or heights that exceed the image dimension. Any updates to
+% the pixels in your callback are ignored.
+%
+% Use this pragma:
+%
+% #pragma omp critical
+%
+% to define a section of code in your callback get method that must be
+% executed by a single thread at a time.
+%
+% The format of the GetImageViewIterator method is:
+%
+% MagickBooleanType GetImageViewIterator(ImageView *source,
+% GetImageViewMethod get,void *context)
+%
+% A description of each parameter follows:
+%
+% o source: the source pixel view.
+%
+% o get: the get callback method.
+%
+% o context: the user defined context.
+%
+*/
+MagickExport MagickBooleanType GetImageViewIterator(ImageView *source,
+ GetImageViewMethod get,void *context)
+{
+#define GetImageViewTag "ImageView/Get"
+
+ Image
+ *source_image;
+
+ MagickBooleanType
+ status;
+
+ MagickOffsetType
+ progress;
+
+ ssize_t
+ y;
+
+ assert(source != (ImageView *) NULL);
+ assert(source->signature == MagickSignature);
+ if (get == (GetImageViewMethod) NULL)
+ return(MagickFalse);
+ source_image=source->image;
+ status=MagickTrue;
+ progress=0;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(static,1) shared(progress,status)
+#endif
+ for (y=source->region.y; y < (ssize_t) source->region.height; y++)
+ {
+ register const IndexPacket
+ *indexes;
+
+ register const PixelPacket
+ *pixels;
+
+ register ssize_t
+ id,
+ x;
+
+ if (status == MagickFalse)
+ continue;
+ id=GetOpenMPThreadId();
+ pixels=GetCacheViewVirtualPixels(source->view,source->region.x,y,
+ source->region.width,1,source->exception);
+ if (pixels == (const PixelPacket *) NULL)
+ {
+ status=MagickFalse;
+ continue;
+ }
+ indexes=GetCacheViewVirtualIndexQueue(source->view);
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (source_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (source_image->storage_class == PseudoClass)
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (get(source,context) == MagickFalse)
+ status=MagickFalse;
+ if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
+ {
+ MagickBooleanType
+ proceed;
+
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp critical (MagickCore_GetImageViewIterator)
+#endif
+ proceed=SetImageProgress(source_image,GetImageViewTag,progress++,
+ source->region.height);
+ if (proceed == MagickFalse)
+ status=MagickFalse;
+ }
+ }
+ return(status);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% G e t I m a g e V i e w P i x e l s %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GetImageViewPixels() returns the pixel view pixel_wands.
+%
+% The format of the GetImageViewPixels method is:
+%
+% PixelImage *GetImageViewPixels(const ImageView *pixel_view)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+*/
+MagickExport PixelPacket **GetImageViewPixels(const ImageView *pixel_view)
+{
+ ssize_t
+ id;
+
+ assert(pixel_view != (ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ id=GetOpenMPThreadId();
+ return((PixelPacket **) NULL);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% G e t I m a g e V i e w W a n d %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GetImageViewImage() returns the magick wand associated with the pixel view.
+%
+% The format of the GetImageViewImage method is:
+%
+% MagickCore *GetImageViewImage(const ImageView *pixel_view)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+*/
+MagickExport Image *GetImageViewImage(const ImageView *pixel_view)
+{
+ assert(pixel_view != (ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ return(pixel_view->image);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% G e t I m a g e V i e w W i d t h %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GetImageViewWidth() returns the pixel view width.
+%
+% The format of the GetImageViewWidth method is:
+%
+% size_t GetImageViewWidth(const ImageView *pixel_view)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+*/
+MagickExport size_t GetImageViewWidth(const ImageView *pixel_view)
+{
+ assert(pixel_view != (ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ return(pixel_view->region.width);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% G e t I m a g e V i e w X %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GetImageViewX() returns the pixel view x offset.
+%
+% The format of the GetImageViewX method is:
+%
+% ssize_t GetImageViewX(const ImageView *pixel_view)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+*/
+MagickExport ssize_t GetImageViewX(const ImageView *pixel_view)
+{
+ assert(pixel_view != (ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ return(pixel_view->region.x);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% G e t I m a g e V i e w Y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% GetImageViewY() returns the pixel view y offset.
+%
+% The format of the GetImageViewY method is:
+%
+% ssize_t GetImageViewY(const ImageView *pixel_view)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+*/
+MagickExport ssize_t GetImageViewY(const ImageView *pixel_view)
+{
+ assert(pixel_view != (ImageView *) NULL);
+ assert(pixel_view->signature == MagickSignature);
+ return(pixel_view->region.y);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% I s I m a g e V i e w %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% IsImageView() returns MagickTrue if the the parameter is verified as a pixel
+% view container.
+%
+% The format of the IsImageView method is:
+%
+% MagickBooleanType IsImageView(const ImageView *pixel_view)
+%
+% A description of each parameter follows:
+%
+% o pixel_view: the pixel view.
+%
+*/
+MagickExport MagickBooleanType IsImageView(const ImageView *pixel_view)
+{
+ if (pixel_view == (const ImageView *) NULL)
+ return(MagickFalse);
+ if (pixel_view->signature != MagickSignature)
+ return(MagickFalse);
+ return(MagickTrue);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% N e w I m a g e V i e w %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% NewImageView() returns a pixel view required for all other methods in the
+% Pixel View API.
+%
+% The format of the NewImageView method is:
+%
+% ImageView *NewImageView(MagickCore *wand)
+%
+% A description of each parameter follows:
+%
+% o wand: the wand.
+%
+*/
+MagickExport ImageView *NewImageView(Image *image)
+{
+ ImageView
+ *pixel_view;
+
+ assert(image != (Image *) NULL);
+ assert(image->signature == MagickSignature);
+ pixel_view=(ImageView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
+ if (pixel_view == (ImageView *) NULL)
+ ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ (void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
+ pixel_view->exception=AcquireExceptionInfo();
+ pixel_view->image=image;
+ pixel_view->view=AcquireCacheView(pixel_view->image);
+ pixel_view->region.width=image->columns;
+ pixel_view->region.height=image->rows;
+ pixel_view->number_threads=GetOpenMPMaximumThreads();
+ pixel_view->debug=IsEventLogging();
+ pixel_view->signature=MagickSignature;
+ return(pixel_view);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% N e w I m a g e V i e w R e g i o n %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% NewImageViewRegion() returns a pixel view required for all other methods
+% in the Pixel View API.
+%
+% The format of the NewImageViewRegion method is:
+%
+% ImageView *NewImageViewRegion(MagickCore *wand,const ssize_t x,
+% const ssize_t y,const size_t width,const size_t height)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+% o x,y,columns,rows: These values define the perimeter of a region of
+% pixel_wands view.
+%
+*/
+MagickExport ImageView *NewImageViewRegion(Image *image,const ssize_t x,
+ const ssize_t y,const size_t width,const size_t height)
+{
+ ImageView
+ *pixel_view;
+
+ assert(image != (Image *) NULL);
+ assert(image->signature == MagickSignature);
+ pixel_view=(ImageView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
+ if (pixel_view == (ImageView *) NULL)
+ ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
+ (void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
+ pixel_view->exception=AcquireExceptionInfo();
+ pixel_view->view=AcquireCacheView(pixel_view->image);
+ pixel_view->image=image;
+ pixel_view->region.width=width;
+ pixel_view->region.height=height;
+ pixel_view->region.x=x;
+ pixel_view->region.y=y;
+ pixel_view->number_threads=GetOpenMPMaximumThreads();
+ pixel_view->debug=IsEventLogging();
+ pixel_view->signature=MagickSignature;
+ return(pixel_view);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% S e t I m a g e V i e w I t e r a t o r %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% SetImageViewIterator() iterates over the pixel view in parallel and calls
+% your set method for each scanline of the view. The pixel region is
+% confined to the image canvas-- that is no negative offsets or widths or
+% heights that exceed the image dimension. The pixels are initiallly
+% undefined and any settings you make in the callback method are automagically
+% synced back to your image.
+%
+% Use this pragma:
+%
+% #pragma omp critical
+%
+% to define a section of code in your callback set method that must be
+% executed by a single thread at a time.
+%
+% The format of the SetImageViewIterator method is:
+%
+% MagickBooleanType SetImageViewIterator(ImageView *destination,
+% SetImageViewMethod set,void *context)
+%
+% A description of each parameter follows:
+%
+% o destination: the pixel view.
+%
+% o set: the set callback method.
+%
+% o context: the user defined context.
+%
+*/
+MagickExport MagickBooleanType SetImageViewIterator(ImageView *destination,
+ SetImageViewMethod set,void *context)
+{
+#define SetImageViewTag "ImageView/Set"
+
+ ExceptionInfo
+ *exception;
+
+ Image
+ *destination_image;
+
+ MagickBooleanType
+ status;
+
+ MagickOffsetType
+ progress;
+
+ ssize_t
+ y;
+
+ assert(destination != (ImageView *) NULL);
+ assert(destination->signature == MagickSignature);
+ if (set == (SetImageViewMethod) NULL)
+ return(MagickFalse);
+ destination_image=destination->image;
+ if (SetImageStorageClass(destination_image,DirectClass) == MagickFalse)
+ return(MagickFalse);
+ status=MagickTrue;
+ progress=0;
+ exception=destination->exception;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(static,1) shared(progress,status)
+#endif
+ for (y=destination->region.y; y < (ssize_t) destination->region.height; y++)
+ {
+ MagickBooleanType
+ sync;
+
+ register IndexPacket
+ *restrict indexes;
+
+ register ssize_t
+ id,
+ x;
+
+ register PixelPacket
+ *restrict pixels;
+
+ if (status == MagickFalse)
+ continue;
+ id=GetOpenMPThreadId();
+ pixels=GetCacheViewAuthenticPixels(destination->view,destination->region.x,
+ y,destination->region.width,1,exception);
+ if (pixels == (PixelPacket *) NULL)
+ {
+ InheritException(destination->exception,GetCacheViewException(
+ destination->view));
+ status=MagickFalse;
+ continue;
+ }
+ indexes=GetCacheViewAuthenticIndexQueue(destination->view);
+ if (set(destination,context) == MagickFalse)
+ status=MagickFalse;
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (destination_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ sync=SyncCacheViewAuthenticPixels(destination->view,exception);
+ if (sync == MagickFalse)
+ {
+ InheritException(destination->exception,GetCacheViewException(
+ destination->view));
+ status=MagickFalse;
+ }
+ if (destination_image->progress_monitor != (MagickProgressMonitor) NULL)
+ {
+ MagickBooleanType
+ proceed;
+
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp critical (MagickCore_SetImageViewIterator)
+#endif
+ proceed=SetImageProgress(destination_image,SetImageViewTag,progress++,
+ destination->region.height);
+ if (proceed == MagickFalse)
+ status=MagickFalse;
+ }
+ }
+ return(status);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% T r a n s f e r I m a g e V i e w I t e r a t o r %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% TransferImageViewIterator() iterates over two pixel views in parallel and
+% calls your transfer method for each scanline of the view. The source pixel
+% region is not confined to the image canvas-- that is you can include
+% negative offsets or widths or heights that exceed the image dimension.
+% However, the destination pixel view is confined to the image canvas-- that
+% is no negative offsets or widths or heights that exceed the image dimension
+% are permitted.
+%
+% Use this pragma:
+%
+% #pragma omp critical
+%
+% to define a section of code in your callback transfer method that must be
+% executed by a single thread at a time.
+%
+% The format of the TransferImageViewIterator method is:
+%
+% MagickBooleanType TransferImageViewIterator(ImageView *source,
+% ImageView *destination,TransferImageViewMethod transfer,void *context)
+%
+% A description of each parameter follows:
+%
+% o source: the source pixel view.
+%
+% o destination: the destination pixel view.
+%
+% o transfer: the transfer callback method.
+%
+% o context: the user defined context.
+%
+*/
+MagickExport MagickBooleanType TransferImageViewIterator(ImageView *source,
+ ImageView *destination,TransferImageViewMethod transfer,void *context)
+{
+#define TransferImageViewTag "ImageView/Transfer"
+
+ ExceptionInfo
+ *exception;
+
+ Image
+ *destination_image,
+ *source_image;
+
+ MagickBooleanType
+ status;
+
+ MagickOffsetType
+ progress;
+
+ ssize_t
+ y;
+
+ assert(source != (ImageView *) NULL);
+ assert(source->signature == MagickSignature);
+ if (transfer == (TransferImageViewMethod) NULL)
+ return(MagickFalse);
+ source_image=source->image;
+ destination_image=destination->image;
+ if (SetImageStorageClass(destination_image,DirectClass) == MagickFalse)
+ return(MagickFalse);
+ status=MagickTrue;
+ progress=0;
+ exception=destination->exception;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(static,1) shared(progress,status)
+#endif
+ for (y=source->region.y; y < (ssize_t) source->region.height; y++)
+ {
+ MagickBooleanType
+ sync;
+
+ register const IndexPacket
+ *restrict indexes;
+
+ register const PixelPacket
+ *restrict pixels;
+
+ register IndexPacket
+ *restrict destination_indexes;
+
+ register ssize_t
+ id,
+ x;
+
+ register PixelPacket
+ *restrict destination_pixels;
+
+ if (status == MagickFalse)
+ continue;
+ id=GetOpenMPThreadId();
+ pixels=GetCacheViewVirtualPixels(source->view,source->region.x,y,
+ source->region.width,1,source->exception);
+ if (pixels == (const PixelPacket *) NULL)
+ {
+ status=MagickFalse;
+ continue;
+ }
+ indexes=GetCacheViewVirtualIndexQueue(source->view);
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (source_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (source_image->storage_class == PseudoClass)
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ destination_pixels=GetCacheViewAuthenticPixels(destination->view,
+ destination->region.x,y,destination->region.width,1,exception);
+ if (destination_pixels == (PixelPacket *) NULL)
+ {
+ status=MagickFalse;
+ continue;
+ }
+ destination_indexes=GetCacheViewAuthenticIndexQueue(destination->view);
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (destination_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (destination_image->storage_class == PseudoClass)
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (transfer(source,destination,context) == MagickFalse)
+ status=MagickFalse;
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ if (destination_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) destination->region.width; x++)
+ ;
+ sync=SyncCacheViewAuthenticPixels(destination->view,exception);
+ if (sync == MagickFalse)
+ {
+ InheritException(destination->exception,GetCacheViewException(
+ source->view));
+ status=MagickFalse;
+ }
+ if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
+ {
+ MagickBooleanType
+ proceed;
+
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp critical (MagickCore_TransferImageViewIterator)
+#endif
+ proceed=SetImageProgress(source_image,TransferImageViewTag,progress++,
+ source->region.height);
+ if (proceed == MagickFalse)
+ status=MagickFalse;
+ }
+ }
+ return(status);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+% U p d a t e I m a g e V i e w I t e r a t o r %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% UpdateImageViewIterator() iterates over the pixel view in parallel and calls
+% your update method for each scanline of the view. The pixel region is
+% confined to the image canvas-- that is no negative offsets or widths or
+% heights that exceed the image dimension are permitted. Updates to pixels
+% in your callback are automagically synced back to the image.
+%
+% Use this pragma:
+%
+% #pragma omp critical
+%
+% to define a section of code in your callback update method that must be
+% executed by a single thread at a time.
+%
+% The format of the UpdateImageViewIterator method is:
+%
+% MagickBooleanType UpdateImageViewIterator(ImageView *source,
+% UpdateImageViewMethod update,void *context)
+%
+% A description of each parameter follows:
+%
+% o source: the source pixel view.
+%
+% o update: the update callback method.
+%
+% o context: the user defined context.
+%
+*/
+MagickExport MagickBooleanType UpdateImageViewIterator(ImageView *source,
+ UpdateImageViewMethod update,void *context)
+{
+#define UpdateImageViewTag "ImageView/Update"
+
+ ExceptionInfo
+ *exception;
+
+ Image
+ *source_image;
+
+ MagickBooleanType
+ status;
+
+ MagickOffsetType
+ progress;
+
+ ssize_t
+ y;
+
+ assert(source != (ImageView *) NULL);
+ assert(source->signature == MagickSignature);
+ if (update == (UpdateImageViewMethod) NULL)
+ return(MagickFalse);
+ source_image=source->image;
+ if (SetImageStorageClass(source_image,DirectClass) == MagickFalse)
+ return(MagickFalse);
+ status=MagickTrue;
+ progress=0;
+ exception=source->exception;
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp parallel for schedule(static,1) shared(progress,status)
+#endif
+ for (y=source->region.y; y < (ssize_t) source->region.height; y++)
+ {
+ register IndexPacket
+ *restrict indexes;
+
+ register ssize_t
+ id,
+ x;
+
+ register PixelPacket
+ *restrict pixels;
+
+ if (status == MagickFalse)
+ continue;
+ id=GetOpenMPThreadId();
+ pixels=GetCacheViewAuthenticPixels(source->view,source->region.x,y,
+ source->region.width,1,exception);
+ if (pixels == (PixelPacket *) NULL)
+ {
+ InheritException(source->exception,GetCacheViewException(
+ source->view));
+ status=MagickFalse;
+ continue;
+ }
+ indexes=GetCacheViewAuthenticIndexQueue(source->view);
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (source_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (update(source,context) == MagickFalse)
+ status=MagickFalse;
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (source_image->colorspace == CMYKColorspace)
+ for (x=0; x < (ssize_t) source->region.width; x++)
+ ;
+ if (SyncCacheViewAuthenticPixels(source->view,exception) == MagickFalse)
+ {
+ InheritException(source->exception,GetCacheViewException(source->view));
+ status=MagickFalse;
+ }
+ if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
+ {
+ MagickBooleanType
+ proceed;
+
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
+ #pragma omp critical (MagickCore_UpdateImageViewIterator)
+#endif
+ proceed=SetImageProgress(source_image,UpdateImageViewTag,progress++,
+ source->region.height);
+ if (proceed == MagickFalse)
+ status=MagickFalse;
+ }
+ }
+ return(status);
+}
--- /dev/null
+/*
+ Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
+ dedicated to making software imaging solutions freely available.
+
+ You may not use this file except in compliance with the License.
+ obtain a copy of the License at
+
+ http://www.imagemagick.org/script/license.php
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITTransferNS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ MagickCore image view methods.
+*/
+#ifndef _MAGICKIMAGE_IMAGE_VIEW_H
+#define _MAGICKIMAGE_IMAGE_VIEW_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+typedef struct _ImageView
+ ImageView;
+
+typedef MagickBooleanType
+ (*DuplexTransferImageViewMethod)(const ImageView *,const ImageView *,
+ ImageView *,void *),
+ (*GetImageViewMethod)(const ImageView *,void *),
+ (*SetImageViewMethod)(ImageView *,void *),
+ (*TransferImageViewMethod)(const ImageView *,ImageView *,void *),
+ (*UpdateImageViewMethod)(ImageView *,void *);
+
+extern MagickExport char
+ *GetImageViewException(const ImageView *,ExceptionType *);
+
+extern MagickExport Image
+ *GetImageViewImage(const ImageView *);
+
+extern MagickExport ImageView
+ *CloneImageView(const ImageView *),
+ *DestroyImageView(ImageView *),
+ *NewImageView(Image *),
+ *NewImageViewRegion(Image *,const ssize_t,const ssize_t,const size_t,
+ const size_t);
+
+extern MagickExport MagickBooleanType
+ DuplexTransferImageViewIterator(ImageView *,ImageView *,ImageView *,
+ DuplexTransferImageViewMethod,void *),
+ GetImageViewIterator(ImageView *,GetImageViewMethod,void *),
+ IsImageView(const ImageView *),
+ SetImageViewIterator(ImageView *,SetImageViewMethod,void *),
+ TransferImageViewIterator(ImageView *,ImageView *,TransferImageViewMethod,
+ void *),
+ UpdateImageViewIterator(ImageView *,UpdateImageViewMethod,void *);
+
+extern MagickExport PixelPacket
+ **GetImageViewPixels(const ImageView *);
+
+extern MagickExport size_t
+ GetImageViewHeight(const ImageView *),
+ GetImageViewWidth(const ImageView *);
+
+extern MagickExport ssize_t
+ GetImageViewX(const ImageView *),
+ GetImageViewY(const ImageView *);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif
DeprecateEvent = 0x00040,
DrawEvent = 0x00080,
ExceptionEvent = 0x00100,
- LocaleEvent = 0x00200,
- ModuleEvent = 0x00400,
- PolicyEvent = 0x00800,
- ResourceEvent = 0x01000,
- TransformEvent = 0x02000,
- UserEvent = 0x04000,
- WandEvent = 0x08000,
- X11Event = 0x10000,
+ ImageEvent = 0x00200,
+ LocaleEvent = 0x00400,
+ ModuleEvent = 0x00800,
+ PolicyEvent = 0x01000,
+ ResourceEvent = 0x02000,
+ TransformEvent = 0x04000,
+ UserEvent = 0x09000,
+ WandEvent = 0x10000,
+ X11Event = 0x20000,
AllEvents = 0x7fffffff
} LogEventType;
#define MagickLibAddendum "-9"
#define MagickLibInterface 3
#define MagickLibMinInterface 3
-#define MagickReleaseDate "2010-06-25"
+#define MagickReleaseDate "2010-06-26"
#define MagickChangeDate "20100622"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-6.6.2/index.html"
#include "wand/mogrify.h"
#include "wand/montage.h"
#include "wand/pixel-iterator.h"
-#include "wand/pixel-view.h"
#include "wand/pixel-wand.h"
#include "wand/stream.h"
+#include "wand/wand-view.h"
extern WandExport char
*MagickGetException(const MagickWand *,ExceptionType *);
wand/montage.h \
wand/pixel-iterator.c \
wand/pixel-iterator.h \
- wand/pixel-view.c \
- wand/pixel-view.h \
wand/pixel-wand.c \
wand/pixel-wand.h \
wand/pixel-wand-private.h \
wand/stream.h \
wand/studio.h \
wand/wand.c \
- wand/wand.h
+ wand/wand.h \
+ wand/wand-view.c \
+ wand/wand-view.h
WAND_INCLUDE_HDRS = \
wand/MagickWand.h \
+++ /dev/null
-/*
- Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
- dedicated to making software imaging solutions freely available.
-
- You may not use this file except in compliance with the License.
- obtain a copy of the License at
-
- http://www.imagemagick.org/script/license.php
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITTransferNS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- MagickWand pixel view methods.
-*/
-#ifndef _MAGICKWAND_PIXEL_VIEW_H
-#define _MAGICKWAND_PIXEL_VIEW_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-typedef struct _PixelView
- PixelView;
-
-typedef MagickBooleanType
- (*DuplexTransferPixelViewMethod)(const PixelView *,const PixelView *,
- PixelView *,void *),
- (*GetPixelViewMethod)(const PixelView *,void *),
- (*SetPixelViewMethod)(PixelView *,void *),
- (*TransferPixelViewMethod)(const PixelView *,PixelView *,void *),
- (*UpdatePixelViewMethod)(PixelView *,void *);
-
-extern WandExport char
- *GetPixelViewException(const PixelView *,ExceptionType *);
-
-extern WandExport MagickBooleanType
- DuplexTransferPixelViewIterator(PixelView *,PixelView *,PixelView *,
- DuplexTransferPixelViewMethod,void *),
- GetPixelViewIterator(PixelView *,GetPixelViewMethod,void *),
- IsPixelView(const PixelView *),
- SetPixelViewIterator(PixelView *,SetPixelViewMethod,void *),
- TransferPixelViewIterator(PixelView *,PixelView *,TransferPixelViewMethod,
- void *),
- UpdatePixelViewIterator(PixelView *,UpdatePixelViewMethod,void *);
-
-extern WandExport MagickWand
- *GetPixelViewWand(const PixelView *);
-
-extern WandExport PixelView
- *ClonePixelView(const PixelView *),
- *DestroyPixelView(PixelView *),
- *NewPixelView(MagickWand *),
- *NewPixelViewRegion(MagickWand *,const ssize_t,const ssize_t,const size_t,
- const size_t);
-
-extern WandExport PixelWand
- **GetPixelViewPixels(const PixelView *);
-
-extern WandExport size_t
- GetPixelViewHeight(const PixelView *),
- GetPixelViewWidth(const PixelView *);
-
-extern WandExport ssize_t
- GetPixelViewX(const PixelView *),
- GetPixelViewY(const PixelView *);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
-#endif
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
-% %
-% PPPP IIIII X X EEEEE L %
-% P P I X X E L %
-% PPPP I X EEE L %
-% P I X X E L %
-% P IIIII X X EEEEE LLLLL %
+% W W AAA N N DDDD %
+% W W A A NN N D D %
+% W W W AAAAA N N N D D %
+% WW WW A A N NN D D %
+% W W A A N N DDDD %
% %
% V V IIIII EEEEE W W %
% V V I E W W %
% V IIIII EEEEE W W %
% %
% %
-% MagickWand Pixel View Methods %
+% MagickWand Wand View Methods %
% %
% Software Design %
% John Cristy %
/*
Define declarations.
*/
-#define PixelViewId "PixelView"
+#define WandViewId "WandView"
\f
/*
Typedef declarations.
*/
-struct _PixelView
+struct _WandView
{
size_t
id;
% %
% %
% %
-% C l o n e P i x e l V i e w %
+% C l o n e W a n d V i e w %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% ClonePixelView() makes a copy of the specified pixel view.
+% CloneWandView() makes a copy of the specified pixel view.
%
-% The format of the ClonePixelView method is:
+% The format of the CloneWandView method is:
%
-% PixelView *ClonePixelView(const PixelView *pixel_view)
+% WandView *CloneWandView(const WandView *pixel_view)
%
% A description of each parameter follows:
%
% o pixel_view: the pixel view.
%
*/
-WandExport PixelView *ClonePixelView(const PixelView *pixel_view)
+WandExport WandView *CloneWandView(const WandView *pixel_view)
{
- PixelView
+ WandView
*clone_view;
register ssize_t
i;
- assert(pixel_view != (PixelView *) NULL);
+ assert(pixel_view != (WandView *) NULL);
assert(pixel_view->signature == WandSignature);
if (pixel_view->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",pixel_view->name);
- clone_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*clone_view));
- if (clone_view == (PixelView *) NULL)
+ clone_view=(WandView *) AcquireAlignedMemory(1,sizeof(*clone_view));
+ if (clone_view == (WandView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
pixel_view->name);
(void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
clone_view->id=AcquireWandId();
(void) FormatMagickString(clone_view->name,MaxTextExtent,"%s-%.20g",
- PixelViewId,(double) clone_view->id);
+ WandViewId,(double) clone_view->id);
clone_view->exception=AcquireExceptionInfo();
InheritException(clone_view->exception,pixel_view->exception);
clone_view->view=CloneCacheView(pixel_view->view);
% %
% %
% %
-% D e s t r o y P i x e l V i e w %
+% D e s t r o y W a n d V i e w %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyPixelView() deallocates memory associated with a pixel view.
+% DestroyWandView() deallocates memory associated with a pixel view.
%
-% The format of the DestroyPixelView method is:
+% The format of the DestroyWandView method is:
%
-% PixelView *DestroyPixelView(PixelView *pixel_view,
+% WandView *DestroyWandView(WandView *pixel_view,
% const size_t number_wands,const size_t number_threads)
%
% A description of each parameter follows:
return(pixel_wands);
}
-WandExport PixelView *DestroyPixelView(PixelView *pixel_view)
+WandExport WandView *DestroyWandView(WandView *pixel_view)
{
- assert(pixel_view != (PixelView *) NULL);
+ assert(pixel_view != (WandView *) NULL);
assert(pixel_view->signature == WandSignature);
pixel_view->pixel_wands=DestroyPixelsThreadSet(pixel_view->pixel_wands,
pixel_view->region.width,pixel_view->number_threads);
pixel_view->exception=DestroyExceptionInfo(pixel_view->exception);
pixel_view->signature=(~WandSignature);
RelinquishWandId(pixel_view->id);
- pixel_view=(PixelView *) RelinquishMagickMemory(pixel_view);
+ pixel_view=(WandView *) RelinquishMagickMemory(pixel_view);
return(pixel_view);
}
\f
% %
% %
% %
-% D u p l e x T r a n s f e r P i x e l V i e w I t e r a t o r %
+% D u p l e x T r a n s f e r W a n d V i e w I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DuplexTransferPixelViewIterator() iterates over three pixel views in
+% DuplexTransferWandViewIterator() iterates over three pixel views in
% parallel and calls your transfer method for each scanline of the view. The
% source and duplex pixel region is not confined to the image canvas-- that is
% you can include negative offsets or widths or heights that exceed the image
% to define a section of code in your callback transfer method that must be
% executed by a single thread at a time.
%
-% The format of the DuplexTransferPixelViewIterator method is:
+% The format of the DuplexTransferWandViewIterator method is:
%
-% MagickBooleanType DuplexTransferPixelViewIterator(PixelView *source,
-% PixelView *duplex,PixelView *destination,
-% DuplexTransferPixelViewMethod transfer,void *context)
+% MagickBooleanType DuplexTransferWandViewIterator(WandView *source,
+% WandView *duplex,WandView *destination,
+% DuplexTransferWandViewMethod transfer,void *context)
%
% A description of each parameter follows:
%
% o context: the user defined context.
%
*/
-WandExport MagickBooleanType DuplexTransferPixelViewIterator(
- PixelView *source,PixelView *duplex,PixelView *destination,
- DuplexTransferPixelViewMethod transfer,void *context)
+WandExport MagickBooleanType DuplexTransferWandViewIterator(
+ WandView *source,WandView *duplex,WandView *destination,
+ DuplexTransferWandViewMethod transfer,void *context)
{
-#define DuplexTransferPixelViewTag "PixelView/DuplexTransfer"
+#define DuplexTransferWandViewTag "WandView/DuplexTransfer"
ExceptionInfo
*exception;
ssize_t
y;
- assert(source != (PixelView *) NULL);
+ assert(source != (WandView *) NULL);
assert(source->signature == WandSignature);
- if (transfer == (DuplexTransferPixelViewMethod) NULL)
+ if (transfer == (DuplexTransferWandViewMethod) NULL)
return(MagickFalse);
source_image=source->wand->images;
duplex_image=duplex->wand->images;
proceed;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp critical (MagickWand_DuplexTransferPixelViewIterator)
+ #pragma omp critical (MagickWand_DuplexTransferWandViewIterator)
#endif
- proceed=SetImageProgress(source_image,DuplexTransferPixelViewTag,
+ proceed=SetImageProgress(source_image,DuplexTransferWandViewTag,
progress++,source->region.height);
if (proceed == MagickFalse)
status=MagickFalse;
% %
% %
% %
-% G e t P i x e l V i e w E x c e p t i o n %
+% G e t W a n d V i e w E x c e p t i o n %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetPixelViewException() returns the severity, reason, and description of any
+% GetWandViewException() returns the severity, reason, and description of any
% error that occurs when utilizing a pixel view.
%
-% The format of the GetPixelViewException method is:
+% The format of the GetWandViewException method is:
%
-% char *GetPixelViewException(const PixelWand *pixel_view,
+% char *GetWandViewException(const PixelWand *pixel_view,
% ExceptionType *severity)
%
% A description of each parameter follows:
% o severity: the severity of the error is returned here.
%
*/
-WandExport char *GetPixelViewException(const PixelView *pixel_view,
+WandExport char *GetWandViewException(const WandView *pixel_view,
ExceptionType *severity)
{
char
*description;
- assert(pixel_view != (const PixelView *) NULL);
+ assert(pixel_view != (const WandView *) NULL);
assert(pixel_view->signature == WandSignature);
if (pixel_view->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",pixel_view->name);
% %
% %
% %
-% G e t P i x e l V i e w H e i g h t %
+% G e t W a n d V i e w H e i g h t %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetPixelViewHeight() returns the pixel view height.
+% GetWandViewHeight() returns the pixel view height.
%
-% The format of the GetPixelViewHeight method is:
+% The format of the GetWandViewHeight method is:
%
-% size_t GetPixelViewHeight(const PixelView *pixel_view)
+% size_t GetWandViewHeight(const WandView *pixel_view)
%
% A description of each parameter follows:
%
% o pixel_view: the pixel view.
%
*/
-WandExport size_t GetPixelViewHeight(const PixelView *pixel_view)
+WandExport size_t GetWandViewHeight(const WandView *pixel_view)
{
- assert(pixel_view != (PixelView *) NULL);
+ assert(pixel_view != (WandView *) NULL);
assert(pixel_view->signature == WandSignature);
return(pixel_view->region.height);
}
% %
% %
% %
-% G e t P i x e l V i e w I t e r a t o r %
+% G e t W a n d V i e w I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetPixelViewIterator() iterates over the pixel view in parallel and calls
+% GetWandViewIterator() iterates over the pixel view in parallel and calls
% your get method for each scanline of the view. The pixel region is
% not confined to the image canvas-- that is you can include negative offsets
% or widths or heights that exceed the image dimension. Any updates to
% to define a section of code in your callback get method that must be
% executed by a single thread at a time.
%
-% The format of the GetPixelViewIterator method is:
+% The format of the GetWandViewIterator method is:
%
-% MagickBooleanType GetPixelViewIterator(PixelView *source,
-% GetPixelViewMethod get,void *context)
+% MagickBooleanType GetWandViewIterator(WandView *source,
+% GetWandViewMethod get,void *context)
%
% A description of each parameter follows:
%
% o context: the user defined context.
%
*/
-WandExport MagickBooleanType GetPixelViewIterator(PixelView *source,
- GetPixelViewMethod get,void *context)
+WandExport MagickBooleanType GetWandViewIterator(WandView *source,
+ GetWandViewMethod get,void *context)
{
-#define GetPixelViewTag "PixelView/Get"
+#define GetWandViewTag "WandView/Get"
Image
*source_image;
ssize_t
y;
- assert(source != (PixelView *) NULL);
+ assert(source != (WandView *) NULL);
assert(source->signature == WandSignature);
- if (get == (GetPixelViewMethod) NULL)
+ if (get == (GetWandViewMethod) NULL)
return(MagickFalse);
source_image=source->wand->images;
status=MagickTrue;
proceed;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp critical (MagickWand_GetPixelViewIterator)
+ #pragma omp critical (MagickWand_GetWandViewIterator)
#endif
- proceed=SetImageProgress(source_image,GetPixelViewTag,progress++,
+ proceed=SetImageProgress(source_image,GetWandViewTag,progress++,
source->region.height);
if (proceed == MagickFalse)
status=MagickFalse;
% %
% %
% %
-% G e t P i x e l V i e w P i x e l s %
+% G e t W a n d V i e w P i x e l s %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetPixelViewPixels() returns the pixel view pixel_wands.
+% GetWandViewPixels() returns the pixel view pixel_wands.
%
-% The format of the GetPixelViewPixels method is:
+% The format of the GetWandViewPixels method is:
%
-% PixelWand *GetPixelViewPixels(const PixelView *pixel_view)
+% PixelWand *GetWandViewPixels(const WandView *pixel_view)
%
% A description of each parameter follows:
%
% o pixel_view: the pixel view.
%
*/
-WandExport PixelWand **GetPixelViewPixels(const PixelView *pixel_view)
+WandExport PixelWand **GetWandViewPixels(const WandView *pixel_view)
{
ssize_t
id;
- assert(pixel_view != (PixelView *) NULL);
+ assert(pixel_view != (WandView *) NULL);
assert(pixel_view->signature == WandSignature);
id=GetOpenMPThreadId();
return(pixel_view->pixel_wands[id]);
% %
% %
% %
-% G e t P i x e l V i e w W a n d %
+% G e t W a n d V i e w W a n d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetPixelViewWand() returns the magick wand associated with the pixel view.
+% GetWandViewWand() returns the magick wand associated with the pixel view.
%
-% The format of the GetPixelViewWand method is:
+% The format of the GetWandViewWand method is:
%
-% MagickWand *GetPixelViewWand(const PixelView *pixel_view)
+% MagickWand *GetWandViewWand(const WandView *pixel_view)
%
% A description of each parameter follows:
%
% o pixel_view: the pixel view.
%
*/
-WandExport MagickWand *GetPixelViewWand(const PixelView *pixel_view)
+WandExport MagickWand *GetWandViewWand(const WandView *pixel_view)
{
- assert(pixel_view != (PixelView *) NULL);
+ assert(pixel_view != (WandView *) NULL);
assert(pixel_view->signature == WandSignature);
return(pixel_view->wand);
}
% %
% %
% %
-% G e t P i x e l V i e w W i d t h %
+% G e t W a n d V i e w W i d t h %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetPixelViewWidth() returns the pixel view width.
+% GetWandViewWidth() returns the pixel view width.
%
-% The format of the GetPixelViewWidth method is:
+% The format of the GetWandViewWidth method is:
%
-% size_t GetPixelViewWidth(const PixelView *pixel_view)
+% size_t GetWandViewWidth(const WandView *pixel_view)
%
% A description of each parameter follows:
%
% o pixel_view: the pixel view.
%
*/
-WandExport size_t GetPixelViewWidth(const PixelView *pixel_view)
+WandExport size_t GetWandViewWidth(const WandView *pixel_view)
{
- assert(pixel_view != (PixelView *) NULL);
+ assert(pixel_view != (WandView *) NULL);
assert(pixel_view->signature == WandSignature);
return(pixel_view->region.width);
}
% %
% %
% %
-% G e t P i x e l V i e w X %
+% G e t W a n d V i e w X %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetPixelViewX() returns the pixel view x offset.
+% GetWandViewX() returns the pixel view x offset.
%
-% The format of the GetPixelViewX method is:
+% The format of the GetWandViewX method is:
%
-% ssize_t GetPixelViewX(const PixelView *pixel_view)
+% ssize_t GetWandViewX(const WandView *pixel_view)
%
% A description of each parameter follows:
%
% o pixel_view: the pixel view.
%
*/
-WandExport ssize_t GetPixelViewX(const PixelView *pixel_view)
+WandExport ssize_t GetWandViewX(const WandView *pixel_view)
{
- assert(pixel_view != (PixelView *) NULL);
+ assert(pixel_view != (WandView *) NULL);
assert(pixel_view->signature == WandSignature);
return(pixel_view->region.x);
}
% %
% %
% %
-% G e t P i x e l V i e w Y %
+% G e t W a n d V i e w Y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetPixelViewY() returns the pixel view y offset.
+% GetWandViewY() returns the pixel view y offset.
%
-% The format of the GetPixelViewY method is:
+% The format of the GetWandViewY method is:
%
-% ssize_t GetPixelViewY(const PixelView *pixel_view)
+% ssize_t GetWandViewY(const WandView *pixel_view)
%
% A description of each parameter follows:
%
% o pixel_view: the pixel view.
%
*/
-WandExport ssize_t GetPixelViewY(const PixelView *pixel_view)
+WandExport ssize_t GetWandViewY(const WandView *pixel_view)
{
- assert(pixel_view != (PixelView *) NULL);
+ assert(pixel_view != (WandView *) NULL);
assert(pixel_view->signature == WandSignature);
return(pixel_view->region.y);
}
% %
% %
% %
-% I s P i x e l V i e w %
+% I s W a n d V i e w %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% IsPixelView() returns MagickTrue if the the parameter is verified as a pixel
+% IsWandView() returns MagickTrue if the the parameter is verified as a pixel
% view container.
%
-% The format of the IsPixelView method is:
+% The format of the IsWandView method is:
%
-% MagickBooleanType IsPixelView(const PixelView *pixel_view)
+% MagickBooleanType IsWandView(const WandView *pixel_view)
%
% A description of each parameter follows:
%
% o pixel_view: the pixel view.
%
*/
-WandExport MagickBooleanType IsPixelView(const PixelView *pixel_view)
+WandExport MagickBooleanType IsWandView(const WandView *pixel_view)
{
size_t
length;
- if (pixel_view == (const PixelView *) NULL)
+ if (pixel_view == (const WandView *) NULL)
return(MagickFalse);
if (pixel_view->signature != WandSignature)
return(MagickFalse);
- length=strlen(PixelViewId);
- if (LocaleNCompare(pixel_view->name,PixelViewId,length) != 0)
+ length=strlen(WandViewId);
+ if (LocaleNCompare(pixel_view->name,WandViewId,length) != 0)
return(MagickFalse);
return(MagickTrue);
}
% %
% %
% %
-% N e w P i x e l V i e w %
+% N e w W a n d V i e w %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% NewPixelView() returns a pixel view required for all other methods in the
+% NewWandView() returns a pixel view required for all other methods in the
% Pixel View API.
%
-% The format of the NewPixelView method is:
+% The format of the NewWandView method is:
%
-% PixelView *NewPixelView(MagickWand *wand)
+% WandView *NewWandView(MagickWand *wand)
%
% A description of each parameter follows:
%
return(pixel_wands);
}
-WandExport PixelView *NewPixelView(MagickWand *wand)
+WandExport WandView *NewWandView(MagickWand *wand)
{
- PixelView
+ WandView
*pixel_view;
assert(wand != (MagickWand *) NULL);
assert(wand->signature == MagickSignature);
- pixel_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
- if (pixel_view == (PixelView *) NULL)
+ pixel_view=(WandView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
+ if (pixel_view == (WandView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
(void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
pixel_view->id=AcquireWandId();
(void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%.20g",
- PixelViewId,(double) pixel_view->id);
+ WandViewId,(double) pixel_view->id);
pixel_view->exception=AcquireExceptionInfo();
pixel_view->wand=wand;
pixel_view->view=AcquireCacheView(pixel_view->wand->images);
% %
% %
% %
-% N e w P i x e l V i e w R e g i o n %
+% N e w W a n d V i e w R e g i o n %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% NewPixelViewRegion() returns a pixel view required for all other methods
+% NewWandViewRegion() returns a pixel view required for all other methods
% in the Pixel View API.
%
-% The format of the NewPixelViewRegion method is:
+% The format of the NewWandViewRegion method is:
%
-% PixelView *NewPixelViewRegion(MagickWand *wand,const ssize_t x,
+% WandView *NewWandViewRegion(MagickWand *wand,const ssize_t x,
% const ssize_t y,const size_t width,const size_t height)
%
% A description of each parameter follows:
% pixel_wands view.
%
*/
-WandExport PixelView *NewPixelViewRegion(MagickWand *wand,const ssize_t x,
+WandExport WandView *NewWandViewRegion(MagickWand *wand,const ssize_t x,
const ssize_t y,const size_t width,const size_t height)
{
- PixelView
+ WandView
*pixel_view;
assert(wand != (MagickWand *) NULL);
assert(wand->signature == MagickSignature);
- pixel_view=(PixelView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
- if (pixel_view == (PixelView *) NULL)
+ pixel_view=(WandView *) AcquireAlignedMemory(1,sizeof(*pixel_view));
+ if (pixel_view == (WandView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
(void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
pixel_view->id=AcquireWandId();
(void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%.20g",
- PixelViewId,(double) pixel_view->id);
+ WandViewId,(double) pixel_view->id);
pixel_view->exception=AcquireExceptionInfo();
pixel_view->view=AcquireCacheView(pixel_view->wand->images);
pixel_view->wand=wand;
% %
% %
% %
-% S e t P i x e l V i e w I t e r a t o r %
+% S e t W a n d V i e w I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% SetPixelViewIterator() iterates over the pixel view in parallel and calls
+% SetWandViewIterator() iterates over the pixel view in parallel and calls
% your set method for each scanline of the view. The pixel region is
% confined to the image canvas-- that is no negative offsets or widths or
% heights that exceed the image dimension. The pixels are initiallly
% to define a section of code in your callback set method that must be
% executed by a single thread at a time.
%
-% The format of the SetPixelViewIterator method is:
+% The format of the SetWandViewIterator method is:
%
-% MagickBooleanType SetPixelViewIterator(PixelView *destination,
-% SetPixelViewMethod set,void *context)
+% MagickBooleanType SetWandViewIterator(WandView *destination,
+% SetWandViewMethod set,void *context)
%
% A description of each parameter follows:
%
% o context: the user defined context.
%
*/
-WandExport MagickBooleanType SetPixelViewIterator(PixelView *destination,
- SetPixelViewMethod set,void *context)
+WandExport MagickBooleanType SetWandViewIterator(WandView *destination,
+ SetWandViewMethod set,void *context)
{
-#define SetPixelViewTag "PixelView/Set"
+#define SetWandViewTag "WandView/Set"
ExceptionInfo
*exception;
ssize_t
y;
- assert(destination != (PixelView *) NULL);
+ assert(destination != (WandView *) NULL);
assert(destination->signature == WandSignature);
- if (set == (SetPixelViewMethod) NULL)
+ if (set == (SetWandViewMethod) NULL)
return(MagickFalse);
destination_image=destination->wand->images;
if (SetImageStorageClass(destination_image,DirectClass) == MagickFalse)
proceed;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp critical (MagickWand_SetPixelViewIterator)
+ #pragma omp critical (MagickWand_SetWandViewIterator)
#endif
- proceed=SetImageProgress(destination_image,SetPixelViewTag,progress++,
+ proceed=SetImageProgress(destination_image,SetWandViewTag,progress++,
destination->region.height);
if (proceed == MagickFalse)
status=MagickFalse;
% %
% %
% %
-% T r a n s f e r P i x e l V i e w I t e r a t o r %
+% T r a n s f e r W a n d V i e w I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% TransferPixelViewIterator() iterates over two pixel views in parallel and
+% TransferWandViewIterator() iterates over two pixel views in parallel and
% calls your transfer method for each scanline of the view. The source pixel
% region is not confined to the image canvas-- that is you can include
% negative offsets or widths or heights that exceed the image dimension.
% to define a section of code in your callback transfer method that must be
% executed by a single thread at a time.
%
-% The format of the TransferPixelViewIterator method is:
+% The format of the TransferWandViewIterator method is:
%
-% MagickBooleanType TransferPixelViewIterator(PixelView *source,
-% PixelView *destination,TransferPixelViewMethod transfer,void *context)
+% MagickBooleanType TransferWandViewIterator(WandView *source,
+% WandView *destination,TransferWandViewMethod transfer,void *context)
%
% A description of each parameter follows:
%
% o context: the user defined context.
%
*/
-WandExport MagickBooleanType TransferPixelViewIterator(PixelView *source,
- PixelView *destination,TransferPixelViewMethod transfer,void *context)
+WandExport MagickBooleanType TransferWandViewIterator(WandView *source,
+ WandView *destination,TransferWandViewMethod transfer,void *context)
{
-#define TransferPixelViewTag "PixelView/Transfer"
+#define TransferWandViewTag "WandView/Transfer"
ExceptionInfo
*exception;
ssize_t
y;
- assert(source != (PixelView *) NULL);
+ assert(source != (WandView *) NULL);
assert(source->signature == WandSignature);
- if (transfer == (TransferPixelViewMethod) NULL)
+ if (transfer == (TransferWandViewMethod) NULL)
return(MagickFalse);
source_image=source->wand->images;
destination_image=destination->wand->images;
proceed;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp critical (MagickWand_TransferPixelViewIterator)
+ #pragma omp critical (MagickWand_TransferWandViewIterator)
#endif
- proceed=SetImageProgress(source_image,TransferPixelViewTag,progress++,
+ proceed=SetImageProgress(source_image,TransferWandViewTag,progress++,
source->region.height);
if (proceed == MagickFalse)
status=MagickFalse;
% %
% %
% %
-% U p d a t e P i x e l V i e w I t e r a t o r %
+% U p d a t e W a n d V i e w I t e r a t o r %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% UpdatePixelViewIterator() iterates over the pixel view in parallel and calls
+% UpdateWandViewIterator() iterates over the pixel view in parallel and calls
% your update method for each scanline of the view. The pixel region is
% confined to the image canvas-- that is no negative offsets or widths or
% heights that exceed the image dimension are permitted. Updates to pixels
% to define a section of code in your callback update method that must be
% executed by a single thread at a time.
%
-% The format of the UpdatePixelViewIterator method is:
+% The format of the UpdateWandViewIterator method is:
%
-% MagickBooleanType UpdatePixelViewIterator(PixelView *source,
-% UpdatePixelViewMethod update,void *context)
+% MagickBooleanType UpdateWandViewIterator(WandView *source,
+% UpdateWandViewMethod update,void *context)
%
% A description of each parameter follows:
%
% o context: the user defined context.
%
*/
-WandExport MagickBooleanType UpdatePixelViewIterator(PixelView *source,
- UpdatePixelViewMethod update,void *context)
+WandExport MagickBooleanType UpdateWandViewIterator(WandView *source,
+ UpdateWandViewMethod update,void *context)
{
-#define UpdatePixelViewTag "PixelView/Update"
+#define UpdateWandViewTag "WandView/Update"
ExceptionInfo
*exception;
ssize_t
y;
- assert(source != (PixelView *) NULL);
+ assert(source != (WandView *) NULL);
assert(source->signature == WandSignature);
- if (update == (UpdatePixelViewMethod) NULL)
+ if (update == (UpdateWandViewMethod) NULL)
return(MagickFalse);
source_image=source->wand->images;
if (SetImageStorageClass(source_image,DirectClass) == MagickFalse)
proceed;
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp critical (MagickWand_UpdatePixelViewIterator)
+ #pragma omp critical (MagickWand_UpdateWandViewIterator)
#endif
- proceed=SetImageProgress(source_image,UpdatePixelViewTag,progress++,
+ proceed=SetImageProgress(source_image,UpdateWandViewTag,progress++,
source->region.height);
if (proceed == MagickFalse)
status=MagickFalse;
--- /dev/null
+/*
+ Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
+ dedicated to making software imaging solutions freely available.
+
+ You may not use this file except in compliance with the License.
+ obtain a copy of the License at
+
+ http://www.imagemagick.org/script/license.php
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITTransferNS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ MagickWand wand view methods.
+*/
+#ifndef _MAGICKWAND_WAND_VIEW_H
+#define _MAGICKWAND_WAND_VIEW_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+typedef struct _WandView
+ WandView;
+
+typedef MagickBooleanType
+ (*DuplexTransferWandViewMethod)(const WandView *,const WandView *,WandView *,
+ void *),
+ (*GetWandViewMethod)(const WandView *,void *),
+ (*SetWandViewMethod)(WandView *,void *),
+ (*TransferWandViewMethod)(const WandView *,WandView *,void *),
+ (*UpdateWandViewMethod)(WandView *,void *);
+
+extern WandExport char
+ *GetWandViewException(const WandView *,ExceptionType *);
+
+extern WandExport MagickBooleanType
+ DuplexTransferWandViewIterator(WandView *,WandView *,WandView *,
+ DuplexTransferWandViewMethod,void *),
+ GetWandViewIterator(WandView *,GetWandViewMethod,void *),
+ IsWandView(const WandView *),
+ SetWandViewIterator(WandView *,SetWandViewMethod,void *),
+ TransferWandViewIterator(WandView *,WandView *,TransferWandViewMethod,void *),
+ UpdateWandViewIterator(WandView *,UpdateWandViewMethod,void *);
+
+extern WandExport MagickWand
+ *GetWandViewWand(const WandView *);
+
+extern WandExport WandView
+ *CloneWandView(const WandView *),
+ *DestroyWandView(WandView *),
+ *NewWandView(MagickWand *),
+ *NewWandViewRegion(MagickWand *,const ssize_t,const ssize_t,const size_t,
+ const size_t);
+
+extern WandExport PixelWand
+ **GetWandViewPixels(const WandView *);
+
+extern WandExport size_t
+ GetWandViewHeight(const WandView *),
+ GetWandViewWidth(const WandView *);
+
+extern WandExport ssize_t
+ GetWandViewX(const WandView *),
+ GetWandViewY(const WandView *);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif