- Modifications to compile ImageMagick

This commit is contained in:
Santi Noreña 2013-02-19 18:37:48 +01:00
parent 615ec83706
commit 83522c16c3
3442 changed files with 57 additions and 412926 deletions

351
ImageMagick/wand/ChangeLog Normal file
View file

@ -0,0 +1,351 @@
2012-07-30 6.7.8-7 Cristy <quetzlzacatenango@image...>
* Add MagickOptimizeImageTransparency() method.
2012-03-18 6.7.6-1 Anthony <anthony@griffith...>
* Add MagickCompositeLayers() to allow you to compose two magick wands
2012-03-15 6.7.6-1 Anthony <anthony@griffith...>
* Rename wand iteration flags to more logical names
* Fix the MagickWand add/read insertion of new images into wands
2010-11-21 6.6.6-0 Cristy <quetzlzacatenango@image...>
* Add DrawGetFontResolution() / DrawSetFontResolution().
2009-10-10 6.5.6-10 Cristy <quetzlzacatenango@image...>
* Add MagickSetImageArtifact(), etc. Wand artifacts are like properties
except they are not exported. They are needed for some method such
as setting compose:args for the composite DisplaceCompositeOp compose
operator.
2009-08-27 6.5.5-3 Cristy <quetzlzacatenango@image...>
* Added MagickSetOpacity/MagickGetOpacity.
2009-07-27 6.5.4-7 Cristy <quetzlzacatenango@image...>
* Added MagickSetBorderColor/MagickGetBorderColor.
2009-04-27 6.5.1-9 Cristy <quetzlzacatenango@image...>
* Added MagickSetImageFuzz/MagickGetImageFuzz.
2009-03-08 6.4.9-10 Mikko <mkoppanen@php...>
* Added DrawGet/SetTextKerning and DrawGet/SetInterWordSpacing.
2008-11-27 6.4.6-7 Cristy <quetzlzacatenango@image...>
* MagickSetVirtualPixelMethod() now properly sets and returns the
virtual pixel method.
2008-11-03 6.4.5-4 Cristy <quetzlzacatenango@image...>
* Do not filter drawing commands.
2008-10-27 6.4.5-1 Cristy <quetzlzacatenango@image...>
* Add MagickSparseColorImage() API method.
2008-02-23 6.3.9-0 Cristy <quetzlzacatenango@image...>
* Patch MagickReadImageBlob() to support Postscript which does not have
native blob support.
2008-01-28 6.3.8-3 Cristy <quetzlzacatenango@image...>
* Return wand->images->depth for MagickGetImageDepth();
2008-01-10 6.3.7-10 Cristy <quetzlzacatenango@image...>
* Inherit image exception *before* destroying the cloned image (reference
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=10415).
2007-11-27 6.3.7-2 Cristy <quetzlzacatenango@image...>
* Fix memory leak in MagickSetImageProfile() (reference
https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10197).
2007-11-06 6.3.6-10 Cristy <quetzlzacatenango@image...>
* New MagickSetImageAlphaChannel() method to activate, deactivate, reset, or
set the image alpha channel.
2007-10-27 6.3.6-4 Cristy <quetzlzacatenango@image...>
* Added get/set font and pointsize methods to magick-property.c (reference
http://www.imagemagick.org/discourse-server/viewtopic.php?f=6&t=9997).
2007-09-10 6.3.5-9 Cristy <quetzlzacatenango@image...>
* Added MagickGetImageProperties(), MagickGetImageOptions(), and
MagickGetImageProfiles() methods.
2007-07-18 6.3.5-3 Cristy <quetzlzacatenango@image...>
* Clone profile before returning from MagickRemoveImageProfile().
2007-07-16 6.3.5-2 Cristy <quetzlzacatenango@image...>
* Add MagickGetType() method.
* Fix MagickAddImage() relative to the iterator offset (reference
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=9218).
2007-05-23 6.3.4-5 Cristy <quetzlzacatenango@image...>
* * Add MagickPaintFloodfillImage() method.
2007-04-18 6.3.3-9 Kwon <xogusgalaxy@nate....>
* Fixed small memory leak in RelinquishWandId().
2007-02-24 6.3.3-0 Cristy <quetzlzacatenango@image...>
* Add MagickResetImagePage() to reset the image page canvas and position.
2007-01-16 6.3.2-0 Cristy <stentz@image...>
* Added methods MagickGetAntialias(), MagickSetAntialias(),
MagickGetInterpolateMethod(), and MagickSetInterpolateMethod().
2007-01-08 6.3.1-7 Cristy <stentz@image...>
* MagickOrtderedPosterizeImage() performs an ordered dither based on a number
of pre-defined dithering threshold maps, but over multiple intensity levels,
which can be different for different channels, according to the input
arguments.
* Added MagickSetImageClipMask(), MagickGetImageClipMask() methods.
* Add MagickSetImageProperty()/MagickGetImageProperty() and deprecate
MagickSetImageAttribute()/MagickGetImageAttribute().
2006-10-12 6.3.0-1 Cristy <stentz@image...>
* MagickSetImageColormapColor() now properly sync the image colormap.
* Add MagickGetImageInterpolateMethod() and MagickSetImageInterpolateMethod().
2006-06-26 6.2.8-6 Cristy <stentz@image...>
* DrawSetFillRule() no longer emits an improper MVG command.
2006-06-26 6.2.8-0 Cristy <stentz@image...>
* Fixed small memory leak in ClearDrawingWand().
2006-05-10 6.2.7-6 Cristy <stentz@image...>
* Add MagickSegmentImage() method to API.
2005-12-31 Cristy <stentz@image...>
* Opacity value not being returned by PixelGetColorAsString() /
PixelGetColorAsNormalizedString() correctly (bug report by O. Watson).
2005-12-28 Cristy <stentz@image...>
* DrawSetGravity() actually sets the gravity when ForgetGravity is
specified (bug report by O. Watson).
* Added MagickSetIteratorIndex() and MagickGetIteratorIndex() and
deprecated MagickSetImageIndex() and MagickGetImageIndex().
2005-12-21 Cristy <stentz@image...>
* PixelSyncIterator() promotes PseudoClass images to DirectClass (bug
report by O. Watson).
* Fix PixelGetIteratorRow() to return the correct image row.
2005-12-11 Cristy <stentz@image...>
* Add PixelGetIteratorRow() and PixelGetCurrentIteratorRow() methods
(suggested by O. Watson).
* Add PixelGetColorAsNormalizedString() method (suggested by O. Watson).
2005-11-14 Cristy <stentz@image...>
* Add MagickSigmoidalContrastImage() method.
* Set the pixel depth in MagickSetPixelColor().
2005-10-28 Cristy <stentz@image...>
* Add MagickRandomThresholdImage(), MagickRandomThresholdImageChannel(),
and MagickShadeImage() (suggested by O. Watson).
2005-10-18 Cristy <stentz@image...>
* PixelGetQuantumColor() automatically converts CMYK pixel wands to RGB.
* Add DrawResetVectorGraphics() method to reset the vector graphics but not
the drawing attributes.
2005-09-20 Cristy <yarrow@image...>
* Do not inherit base opacity when setting fill/stroke color.
2005-09-10 Cristy <yarrow@image...>
* Added MagickGetImageTicksPerSecond() and MagickSetImageTicksPerSecond().
* Added MagickGetMagickResource().
* Added MagickThumbnaiImage().
2005-09-01 Cristy <yarrow@image...>
* DrawSetStrokeDashArray() no longer faults for an array of one element
(bug report by O. Watson).
2005-08-24 Cristy <yarrow@image...>
* Add MagickWandGenesis() and MagickWandTermnus() methods.
2005-08-06 Cristy <yarrow@image...>
* Add MagickSetImageExtent() method.
* Add MagickSetType() method.
2005-06-15 Cristy <yarrow@image...>
* Add MagickClearException() to wand/magick-wand.h.
2005-06-15 Cristy <yarrow@image...>
* DrawGetFillOpacity() and DrawSetFillOpacity() were setting alpha values
rather than opacity. Note, both of these methods are deprecated.
* Added MagickSetImageProgressMonitor() to monitor the progress of a specific
image.
2005-06-07 Cristy <yarrow@image...>
* Initialize pixel iterator ID in NewPixelRegionIterator (bug report by
O. Watson).
* Add MagickGetImagePixelColor() method (suggested by O. Watson).
2005-06-01 Cristy <yarrow@image...>
* Added methods PixelSetFirstIteratorRow(), PixelSetLastIteratorRow(),
and IsPixelWandSimilar().
2005-05-28 Cristy <yarrow@image...>
* MagickGetImageTotalInkDensity() returns the total ink density for an image.
2005-05-16 Cristy <yarrow@image...>
* Add MagickSetPage() and MagickSetImagePage() methods.
2005-05-10 Cristy <yarrow@image...>
* CloneDrawingWand() no longer faults when the supplied drawing wand has not
been initialized.
2005-05-08 Cristy <yarrow@image...>
* MagickGetImageCompressionQuality() properly returns the image compression
quality. Previously it returned the wand compression quality.
2005-04-29 Cristy <yarrow@image...>
* PixelSetYellowQuantum() now sets the correct color component.
* Add MagickSetBackgroundColor() method to set the wand's background color
attribute.
2005-04-14 Cristy <yarrow@image...>
* Inherit exception when MagickWriteImageFile() fails.
2005-04-11 Cristy <yarrow@image...>
* Added MagickRegionOfInterestImage() to return a region of an image as a
new wand.
2005-04-10 Cristy <yarrow@image...>
* Throw exception if fdopen() fails in
MagickWriteImageFile()/MagickReadImageFile() methods.
2005-03-22 Cristy <yarrow@image...>
* Added MagickSigmoidalContrastImage() for sigmoidal non-linearity contrast
control.
2005-03-10 Chris Madison <madisonblu@hotma...>
* Added the MagickSepiaToneImage() method to simulate a sepia-toned photo.
2004-03-05 Chris Madison <madisonblu@hotma...>
* Add MagickGetImageAttribute() method.
2005-02-15 Peter Seiderer <ps.report@gmx.n...>
* Avoid an assert by checking the return from GetImageFromMagickWand(0.
2005-01-19 Cristy <yarrow@image...>
* Permit NULL for MagickSetFilename() & MagickSetImageFilename().
2005-01-10 Cristy <yarrow@image...>
* Permit NULL for MagickSetFormat() & MagickSetImageFormat().
2004-12-15 Cristy <yarrow@image...>
* Added ClearMagickWand(), ClearPixelIterator(), ClearPixelWand() and
ClearDrawingWand() methods.
2004-12-10 Cristy <yarrow@image...>
* Set the vector graphics length in DrawSetVectorGraphics() (bug report from
O. Watson).
2004-12-09 Cristy <yarrow@image...>
* Classic off-by-one patch for CloneDrawingWand() (bug report from O. Watson).
2004-12-08 Cristy <yarrow@image...>
* DrawGetStrokeOpacity() just calls DrawGetStrokeAlpha(); it is supposed to
return the stroke color's opacity, not the alpha (problem reports from O.
Watson).
2004-12-07 Cristy <yarrow@image...>
* Fixed problem reports from O. Watson:
1) If the format of an image is not set, the BLOB returned by
MagickGetImageBlob() will be empty, but no MagickWand error condition
is ever set.
2) If the MagickWand's image sequence's format if set (via
MagickSetFormat()), but the image formats of individual images are not
set, any attempt to retrieve the sequence's image BLOB still fails
(i.e. via MagickGetImagesBlob()). If the MagickWand's image format
has been set, the API should use that format as the exclusive format
for the returned BLOB.
3) When the situation in #2 above occurs, no error condition is
set. If the problem mentioned in #2 is fixed, an error condition
should be set if there is nothing (no format or no filename), from
which the API can determine the image format in which it should
return the BLOB.
4) Even though the MagickWand's image format has been set, when each
individual image's format/filename is empty, MagickWriteImagesFile()
sets the following error:
no encode delegate for this image format 'filename.ext.0'
where "filename.ext" was the name of the file on which the filehandle
was opened. The format of the MagickWand (if it is set). should
suffice as the desired encoding delegate.
2004-11-18 Cristy <yarrow@image...>
* Added MagickNewImage() adds a blank image canvas of the specified size and
background color to the wand.
2004-11-15 Cristy <yarrow@image...>
* Added MagickGetInterlaceScheme() to correspond to
MagickSetInterlaceScheme().
2004-11-06 Cristy <yarrow@image...>
* GNS contributed MagickQueryMultilineFontMetrics(). Its like
MagickQueryFontMetrics() but returns the maximum text width and height for
multiple lines of text.
2004-11-04 Cristy <yarrow@image...>
* MagickReadImageBlob() and MagickReadImageFile() calls GetFirstImageInList(),
previously GetLastImageInList().
2004-10-28 Cristy <yarrow@image...>
* MagickTrimImage() was not properly trimmming the image.
2004-10-27 Cristy <yarrow@image...>
* Added DrawSetTextAlignment() and DrawGetTextAlignment() methods (suggested
by Daniel Jackson).
2004-10-25 Cristy <yarrow@image...>
* Verify the Wand QuantumDepth matches that of the ImageMagick core API.
* Added MagickSetAdjoin() and MagickSetImageAdjoin() methods.
2004-10-17 Cristy <yarrow@image...>
* Added the MagickGetImagesBlob() method to turn an image sequence into a
blob.
2004-10-14 Cristy <yarrow@image...>
* Added methods MagickClearException(), DrawClearException(),
PixelClearException(), and PixelClearIteratorException().
2004-10-12 Cristy <yarrow@image...>
* Add DrawGetVectorGraphics()/DrawSetVectorGraphics()/methods as a way to
persist the vector graphics state.
2004-09-30 Cristy <yarrow@image...>
* Add new MagickQueryConfigureOption() method to return a valur associated
with a particular option.
2004-09-29 Cristy <yarrow@image...>
* Return an error if MagickSetImageIndex() requests a bogus image index.
* MagickWriteImages(): default to a reasonable filename when no filename is
provided.
2004-09-28 Cristy <yarrow@image...>
* Add new CloneDrawingWand() method.
2004-09-15 Cristy <yarrow@image...>
* If the filename parameter of MagickWriteImage() is NULL, use the existing
filename.
2004-09-13 Chris Madison <madisonblu@hotma...>
* DestroyMagickWand() was previous void, now it returns (MagickWand *) NULL
to force the wand to a known value and to detect logic errors in the program
(any reference to the wand after it is destroyed will cause a fault).
Other destroy methods will be changed in this manner as well. Note,
this change will not affect existing programs that rely on these methods.
2004-09-11 Cristy <yarrow@image...>
* Relinquish pixel iterator ID to prevent small memory leak.
2004-09-08 Cristy <yarrow@image...>
* Add MagickSetResolution(), required to render Postscript at a density
other than the default (e.g. 72dpi).
2004-09-03 Cristy <yarrow@image...>
* Add IsMagickWand(), IsDrawingWand(), IsPixelWand(), and IsPixelIterator()
methods.
* Convert several drawing wand methods from void to MagickBooleanType so
they return MagickFalse if an error occurs (e.g. DrawComposite()).
2004-08-28 Cristy <yarrow@image...>
* We now export the DrawComposite() drawing wand method as a public method.
Previously it was private.

View file

@ -0,0 +1,11 @@
prefix=/home/santi/lms/install
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/ImageMagick
Name: MagickWand
Version: 6.8.3
Description: MagickWand - C API for ImageMagick (ABI Q16)
Requires: ImageMagick
Libs: -L${libdir} -lMagickWand-6.Q16 -lMagickCore-6.Q16
Cflags: -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16

View file

@ -0,0 +1,69 @@
.ad l
.nh
.TH MagickWand-Config 1 "2 May 2002" "Wand"
.SH NAME
MagickWand-config \- get information about the installed version of the Magick Wand
.SH SYNOPSIS
.B MagickWand-config
.B [--cflags]
.B [--cppflags]
.B [--exec-prefix]
.B [--ldflags]
.B [--libs]
.B [--prefix]
.B [--version]
.SH DESCRIPTION
.B MagickWand-config
prints the compiler and linker flags required to compile and link programs
that use the
.BR Wand
Application Programmer Interface.
.SH EXAMPLES
To print the version of the installed distribution of
.BR Wand ,
use:
.nf
MagickWand-config \-\-version
.fi
To compile a program that calls the
.BR Wand
Application Programmer Interface, use:
.nf
cc `MagickWand-config \-\-cflags \-\-cppflags \-\-ldflags \-\-libs` program.c
.fi
.SH OPTIONS
.TP
.B \-\-cflags
Print the compiler flags that were used to compile
.BR libWand .
.TP
.B \-\-cppflags
Print the preprocessor flags that are needed to find the
.B Wand
C include files and defines to ensure that the Wand data structures match between
your program and the installed libraries.
.TP
.B \-\-exec-prefix
Print the directory under which target specific binaries and executables are installed.
.TP
.B \-\-ldflags
Print the linker flags that are needed to link with the
.B Wand
library.
.TP
.B \-\-libs
Print the linker flags that are needed to link a program with
.BR libWand .
.TP
.B \-\-version
Print the version of the
.B Wand
distribution to standard output.
.SH COPYRIGHT
See http://www.imagemagick.org/script/license.php
.SH AUTHORS
John Cristy, ImageMagick Studio LLC

View file

@ -0,0 +1,62 @@
#!/bin/sh
#
# Configure options script for re-calling MagickWand compilation options
# required to use the MagickWand library.
#
prefix=@prefix@
exec_prefix=@exec_prefix@
usage="\
Usage: MagickWand-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]"
if test $# -eq 0; then
echo "${usage}" 1>&2
echo "Example: gcc \`MagickWand-config --cflags --cppflags\` -o wand wand.c \`MagickWand-config --ldflags --libs\`" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo '@PACKAGE_VERSION@ Q@QUANTUM_DEPTH@ @MAGICK_HDRI@'
;;
--cflags)
pkg-config --cflags MagickWand
;;
--cxxflags)
pkg-config --cflags MagickWand
;;
--cppflags)
pkg-config --cflags MagickWand
;;
--ldflags)
pkg-config --libs MagickWand
;;
--libs)
pkg-config --libs MagickWand
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done

View file

@ -0,0 +1,115 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand Application Programming Interface declarations.
*/
#ifndef _MAGICK_WAND_H
#define _MAGICK_WAND_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#if !defined(_MAGICKWAND_CONFIG_H)
# define _MAGICKWAND_CONFIG_H
# if !defined(vms) && !defined(macintosh)
# include "magick/magick-config.h"
# else
# include "magick-config.h"
# endif
#if defined(_magickcore_const) && !defined(const)
# define const _magickcore_const
#endif
#if defined(_magickcore_inline) && !defined(inline)
# define inline _magickcore_inline
#endif
#if defined(_magickcore_restrict) && !defined(restrict)
# define restrict _magickcore_restrict
#endif
# if defined(__cplusplus) || defined(c_plusplus)
# undef inline
# endif
#endif
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <sys/types.h>
#if defined(WIN32) || defined(WIN64)
# define MAGICKCORE_WINDOWS_SUPPORT
#else
# define MAGICKCORE_POSIX_SUPPORT
#endif
typedef struct _MagickWand
MagickWand;
#include "wand/method-attribute.h"
#include "magick/MagickCore.h"
#include "wand/animate.h"
#include "wand/compare.h"
#include "wand/composite.h"
#include "wand/conjure.h"
#include "wand/convert.h"
#include "wand/deprecate.h"
#include "wand/display.h"
#include "wand/drawing-wand.h"
#include "wand/identify.h"
#include "wand/import.h"
#include "wand/magick-property.h"
#include "wand/magick-image.h"
#include "wand/mogrify.h"
#include "wand/montage.h"
#include "wand/pixel-iterator.h"
#include "wand/pixel-wand.h"
#include "wand/stream.h"
#include "wand/wand-view.h"
extern WandExport char
*MagickGetException(const MagickWand *,ExceptionType *);
extern WandExport ExceptionType
MagickGetExceptionType(const MagickWand *);
extern WandExport MagickBooleanType
IsMagickWand(const MagickWand *),
MagickClearException(MagickWand *),
MagickSetIteratorIndex(MagickWand *,const ssize_t);
extern WandExport MagickWand
*CloneMagickWand(const MagickWand *),
*DestroyMagickWand(MagickWand *),
*NewMagickWand(void),
*NewMagickWandFromImage(const Image *);
extern WandExport ssize_t
MagickGetIteratorIndex(MagickWand *);
extern WandExport void
ClearMagickWand(MagickWand *),
MagickWandGenesis(void),
MagickWandTerminus(void),
*MagickRelinquishMemory(void *),
MagickResetIterator(MagickWand *),
MagickSetFirstIterator(MagickWand *),
MagickSetLastIterator(MagickWand *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

View file

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@/ImageMagick
Name: MagickWand
Version: @PACKAGE_VERSION@
Description: MagickWand - C API for ImageMagick (ABI @MAGICK_ABI_SUFFIX@)
Requires: ImageMagick
Libs: -L${libdir} -lMagickWand-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@ -lMagickCore-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
Cflags: -I${includedir} @MAGICK_PCFLAGS@

View file

@ -0,0 +1,144 @@
# Copyright 1999-2013 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.
#
# Makefile for building MagickWand API.
#
wandincdir = $(INCLUDE_PATH)/wand
WAND_SOURCES = \
wand/MagickWand.h \
wand/animate.c \
wand/animate.h \
wand/compare.c \
wand/compare.h \
wand/composite.c \
wand/composite.h \
wand/conjure.c \
wand/conjure.h \
wand/convert.c \
wand/convert.h \
wand/deprecate.h \
wand/deprecate.c \
wand/display.c \
wand/display.h \
wand/drawing-wand.c \
wand/drawing-wand.h \
wand/identify.c \
wand/identify.h \
wand/import.c \
wand/import.h \
wand/magick-image.c \
wand/magick-image.h \
wand/magick-property.c \
wand/magick-property.h \
wand/magick-wand.c \
wand/magick-wand.h \
wand/magick-wand-private.h \
wand/method-attribute.h \
wand/mogrify.c \
wand/mogrify.h \
wand/mogrify-private.h \
wand/montage.c \
wand/montage.h \
wand/pixel-iterator.c \
wand/pixel-iterator.h \
wand/pixel-wand.c \
wand/pixel-wand.h \
wand/pixel-wand-private.h \
wand/stream.c \
wand/stream.h \
wand/studio.h \
wand/wand.c \
wand/wand.h \
wand/wand-view.c \
wand/wand-view.h
WAND_INCLUDE_HDRS = \
wand/MagickWand.h \
wand/animate.h \
wand/compare.h \
wand/composite.h \
wand/conjure.h \
wand/convert.h \
wand/deprecate.h \
wand/display.h \
wand/drawing-wand.h \
wand/identify.h \
wand/import.h \
wand/magick-image.h \
wand/magick-property.h \
wand/magick-wand.h \
wand/magick_wand.h \
wand/method-attribute.h \
wand/mogrify.h \
wand/montage.h \
wand/pixel-iterator.h \
wand/pixel-wand.h \
wand/stream.h \
wand/wand-view.h
WAND_NOINST_HDRS = \
wand/mogrify-private.h \
wand/magick-wand-private.h \
wand/pixel-wand-private.h \
wand/studio.h \
wand/wand.h
# Headers which are installed
wandinc_HEADERS = \
$(WAND_INCLUDE_HDRS)
WAND_BIN_SCRPTS = \
wand/Wand-config \
wand/MagickWand-config
WAND_PKGCONFIG = \
wand/MagickWand.pc \
wand/Wand.pc \
wand/MagickWand-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.pc \
wand/Wand-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.pc
WAND_MANS = \
wand/MagickWand-config.1 \
wand/Wand-config.1
WAND_BUILT_SRCS =
MAGICKWAND_LIBS = wand/libMagickWand-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@.la
wand_libMagickWand_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURCES = $(WAND_SOURCES)
wand_libMagickWand_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_CPPFLAGS = $(LIBRARY_EXTRA_CPPFLAGS)
if HAVE_LD_VERSION_SCRIPT
wand_libMagickWand_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LDFLAGS_VERSION = -Wl,--version-script=$(top_srcdir)/wand/libMagickWand.map
else
wand_libMagickWand_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LDFLAGS_VERSION = -export-symbols-regex ".*"
endif
wand_libMagickWand_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LDFLAGS = -no-undefined \
$(wand_libMagickWand_la_LDFLAGS_VERSION) $(MAGICK_LT_RELEASE_OPTS) \
-version-info \
$(MAGICK_LIBRARY_CURRENT):$(MAGICK_LIBRARY_REVISION):$(MAGICK_LIBRARY_AGE)
wand_libMagickWand_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_LIBADD = $(MAGICKCORE_LIBS) $(X11_LIBS) $(GOMP_LIBS) $(MATH_LIBS)
WAND_EXTRA_DIST = \
wand/ChangeLog \
wand/libMagickWand.map \
wand/MagickWand-config.1 \
wand/MagickWand.pc.in \
wand/Wand-config.1 \
wand/Wand.pc.in
WAND_CLEANFILES =

View file

@ -0,0 +1,11 @@
prefix=/home/santi/lms/install
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/ImageMagick
Name: Wand
Version: 6.8.3
Description: MagickWand - C API for ImageMagick (ABI Q16)
Requires: ImageMagick
Libs: -L${libdir} -lMagickWand-6.Q16 -lMagickCore-6.Q16
Cflags: -I${includedir} -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16

View file

@ -0,0 +1,69 @@
.ad l
.nh
.TH Wand-Config 1 "2 May 2002" "Wand"
.SH NAME
Wand-config \- get information about the installed version of the Magick Wand
.SH SYNOPSIS
.B Wand-config
.B [--cflags]
.B [--cppflags]
.B [--exec-prefix]
.B [--ldflags]
.B [--libs]
.B [--prefix]
.B [--version]
.SH DESCRIPTION
.B Wand-config
prints the compiler and linker flags required to compile and link programs
that use the
.BR Wand
Application Programmer Interface.
.SH EXAMPLES
To print the version of the installed distribution of
.BR Wand ,
use:
.nf
Wand-config \-\-version
.fi
To compile a program that calls the
.BR Wand
Application Programmer Interface, use:
.nf
cc `Wand-config \-\-cflags \-\-cppflags \-\-ldflags \-\-libs` program.c
.fi
.SH OPTIONS
.TP
.B \-\-cflags
Print the compiler flags that were used to compile
.BR libWand .
.TP
.B \-\-cppflags
Print the preprocessor flags that are needed to find the
.B Wand
C include files and defines to ensure that the Wand data structures match between
your program and the installed libraries.
.TP
.B \-\-exec-prefix
Print the directory under which target specific binaries and executables are installed.
.TP
.B \-\-ldflags
Print the linker flags that are needed to link with the
.B Wand
library.
.TP
.B \-\-libs
Print the linker flags that are needed to link a program with
.BR libWand .
.TP
.B \-\-version
Print the version of the
.B Wand
distribution to standard output.
.SH COPYRIGHT
See http://www.imagemagick.org/script/license.php
.SH AUTHORS
John Cristy, ImageMagick Studio LLC

View file

@ -0,0 +1,62 @@
#!/bin/sh
#
# Configure options script for re-calling MagickWand compilation options
# required to use the MagickWand library.
#
prefix=@prefix@
exec_prefix=@exec_prefix@
usage="\
Usage: Wand-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]"
if test $# -eq 0; then
echo "${usage}" 1>&2
echo "Example: gcc \`Wand-config --cflags --cppflags\` -o wand wand.c \`Wand-config --ldflags --libs\`" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo '@PACKAGE_VERSION@ Q@QUANTUM_DEPTH@ @MAGICK_HDRI@'
;;
--cflags)
pkg-config --cflags MagickWand
;;
--cxxflags)
pkg-config --cflags MagickWand
;;
--cppflags)
pkg-config --cflags MagickWand
;;
--ldflags)
pkg-config --libs MagickWand
;;
--libs)
pkg-config --libs MagickWand
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done

View file

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@/ImageMagick
Name: Wand
Version: @PACKAGE_VERSION@
Description: MagickWand - C API for ImageMagick (ABI @MAGICK_ABI_SUFFIX@)
Requires: ImageMagick
Libs: -L${libdir} -lMagickWand-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@ -lMagickCore-@MAGICK_MAJOR_VERSION@.@MAGICK_ABI_SUFFIX@
Cflags: -I${includedir} @MAGICK_PCFLAGS@

1464
ImageMagick/wand/animate.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand animate command-line methods.
*/
#ifndef _MAGICKWAND_ANIMATE_H
#define _MAGICKWAND_ANIMATE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
AnimateImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

1198
ImageMagick/wand/compare.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand compare command-line method.
*/
#ifndef _MAGICKWAND_COMPARE_H
#define _MAGICKWAND_COMPARE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
CompareImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

1667
ImageMagick/wand/composite.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand composite command-line method.
*/
#ifndef _MAGICKWAND_COMPOSITE_H
#define _MAGICKWAND_COMPOSITE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
CompositeImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

309
ImageMagick/wand/conjure.c Normal file
View file

@ -0,0 +1,309 @@
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% CCCC OOO N N JJJJJ U U RRRR EEEEE %
% C O O NN N J U U R R E %
% C O O N N N J U U RRRR EEE %
% C O O N NN J J U U R R E %
% CCCC OOO N N JJJ UUU R R EEEEE %
% %
% %
% Interpret Magick Scripting Language. %
% %
% Software Design %
% John Cristy %
% December 2001 %
% %
% %
% Copyright 1999-2013 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. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% The conjure program gives you the ability to perform custom image processing
% tasks from a script written in the Magick Scripting Language (MSL). MSL is
% XML-based and consists of action statements with attributes. Actions include
% reading an image, processing an image, getting attributes from an image,
% writing an image, and more. An attribute is a key/value pair that modifies
% the behavior of an action.
%
*/
/*
Include declarations.
*/
#include "wand/studio.h"
#include "wand/MagickWand.h"
#include "wand/mogrify-private.h"
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
+ C o n j u r e I m a g e C o m m a n d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ConjureImageCommand() describes the format and characteristics of one or
% more image files. It will also report if an image is incomplete or corrupt.
% The information displayed includes the scene number, the file name, the
% width and height of the image, whether the image is colormapped or not,
% the number of colors in the image, the number of bytes in the image, the
% format of the image (JPEG, PNM, etc.), and finally the number of seconds
% it took to read and process the image.
%
% The format of the ConjureImageCommand method is:
%
% MagickBooleanType ConjureImageCommand(ImageInfo *image_info,int argc,
% char **argv,char **metadata,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% o image_info: the image info.
%
% o argc: the number of elements in the argument vector.
%
% o argv: A text array containing the command line arguments.
%
% o metadata: any metadata is returned here.
%
% o exception: return any errors or warnings in this structure.
%
*/
static MagickBooleanType ConjureUsage(void)
{
const char
**p;
static const char
*miscellaneous[]=
{
"-debug events display copious debugging information",
"-help print program options",
"-list type print a list of supported option arguments",
"-log format format of debugging information",
"-version print version information",
(char *) NULL
},
*settings[]=
{
"-monitor monitor progress",
"-quiet suppress all warning messages",
"-regard-warnings pay attention to warning messages",
"-seed value seed a new sequence of pseudo-random numbers",
"-verbose print detailed information about the image",
(char *) NULL
};
ListMagickVersion(stdout);
(void) printf("Usage: %s [options ...] file [ [options ...] file ...]\n",
GetClientName());
(void) printf("\nImage Settings:\n");
for (p=settings; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
(void) printf("\nMiscellaneous Options:\n");
for (p=miscellaneous; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
(void) printf("\nIn addition, define any key value pairs required by "
"your script. For\nexample,\n\n");
(void) printf(" conjure -size 100x100 -color blue -foo bar script.msl\n");
return(MagickFalse);
}
WandExport MagickBooleanType ConjureImageCommand(ImageInfo *image_info,
int argc,char **argv,char **wand_unused(metadata),ExceptionInfo *exception)
{
#define DestroyConjure() \
{ \
image=DestroyImageList(image); \
for (i=0; i < (ssize_t) argc; i++) \
argv[i]=DestroyString(argv[i]); \
argv=(char **) RelinquishMagickMemory(argv); \
}
#define ThrowConjureException(asperity,tag,option) \
{ \
(void) ThrowMagickException(exception,GetMagickModule(),asperity,tag,"`%s'", \
option); \
DestroyConjure(); \
return(MagickFalse); \
}
#define ThrowConjureInvalidArgumentException(option,argument) \
{ \
(void) ThrowMagickException(exception,GetMagickModule(),OptionError, \
"InvalidArgument","`%s': %s",option,argument); \
DestroyConjure(); \
return(MagickFalse); \
}
char
*option;
Image
*image;
MagickStatusType
status;
register ssize_t
i;
ssize_t
number_images;
/*
Set defaults.
*/
assert(image_info != (ImageInfo *) NULL);
assert(image_info->signature == MagickSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(exception != (ExceptionInfo *) NULL);
if (argc < 2)
return(ConjureUsage());
image=NewImageList();
number_images=0;
option=(char *) NULL;
/*
Conjure an image.
*/
ReadCommandlLine(argc,&argv);
status=ExpandFilenames(&argc,&argv);
if (status == MagickFalse)
ThrowConjureException(ResourceLimitError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
for (i=1; i < (ssize_t) argc; i++)
{
option=argv[i];
if (IsCommandOption(option) != MagickFalse)
{
if (LocaleCompare("concurrent",option+1) == 0)
break;
if (LocaleCompare("debug",option+1) == 0)
{
ssize_t
event;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowConjureException(OptionError,"MissingArgument",option);
event=ParseCommandOption(MagickLogEventOptions,MagickFalse,argv[i]);
if (event < 0)
ThrowConjureException(OptionError,"UnrecognizedEventType",
argv[i]);
(void) SetLogEventMask(argv[i]);
continue;
}
if (LocaleCompare("duration",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowConjureException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowConjureInvalidArgumentException(option,argv[i]);
continue;
}
if ((LocaleCompare("help",option+1) == 0) ||
(LocaleCompare("-help",option+1) == 0))
{
if (*option == '-')
return(ConjureUsage());
continue;
}
if (LocaleCompare("log",option+1) == 0)
{
if (*option == '-')
{
i++;
if (i == (ssize_t) argc)
ThrowConjureException(OptionError,"MissingLogFormat",option);
(void) SetLogFormat(argv[i]);
}
continue;
}
if (LocaleCompare("monitor",option+1) == 0)
continue;
if (LocaleCompare("quiet",option+1) == 0)
continue;
if (LocaleCompare("regard-warnings",option+1) == 0)
break;
if (LocaleCompare("seed",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowConjureException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowConjureInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("verbose",option+1) == 0)
{
image_info->verbose=(*option == '-') ? MagickTrue : MagickFalse;
continue;
}
if ((LocaleCompare("version",option+1) == 0) ||
(LocaleCompare("-version",option+1) == 0))
{
ListMagickVersion(stdout);
return(MagickFalse);
}
/*
Persist key/value pair.
*/
(void) DeleteImageOption(image_info,option+1);
status=SetImageOption(image_info,option+1,argv[i+1]);
if (status == MagickFalse)
ThrowConjureException(ImageError,"UnableToPersistKey",option);
i++;
continue;
}
/*
Interpret MSL script.
*/
(void) DeleteImageOption(image_info,"filename");
status=SetImageOption(image_info,"filename",argv[i]);
if (status == MagickFalse)
ThrowConjureException(ImageError,"UnableToPersistKey",argv[i]);
(void) FormatLocaleString(image_info->filename,MaxTextExtent,"msl:%s",
argv[i]);
(void) SetImageOption(image_info,"filename",argv[i]);
image=ReadImages(image_info,exception);
CatchException(exception);
if (image != (Image *) NULL)
image=DestroyImageList(image);
status=image != (Image *) NULL ? MagickTrue : MagickFalse;
number_images++;
}
if (i != (ssize_t) argc)
ThrowConjureException(OptionError,"MissingAnImageFilename",argv[i]);
if (number_images == 0)
ThrowConjureException(OptionError,"MissingAnImageFilename",argv[argc-1]);
if (image != (Image *) NULL)
image=DestroyImageList(image);
for (i=0; i < (ssize_t) argc; i++)
argv[i]=DestroyString(argv[i]);
argv=(char **) RelinquishMagickMemory(argv);
return(status != 0 ? MagickTrue : MagickFalse);
}

View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand conjure command-line method.
*/
#ifndef _MAGICKWAND_CONJURE_H
#define _MAGICKWAND_CONJURE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
ConjureImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

3088
ImageMagick/wand/convert.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand convert command-line method.
*/
#ifndef _MAGICKWAND_CONVERT_H
#define _MAGICKWAND_CONVERT_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
ConvertImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

3091
ImageMagick/wand/deprecate.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,176 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickCore deprecated methods.
*/
#ifndef _MAGICKWAND_DEPRECATE_H
#define _MAGICKWAND_DEPRECATE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED)
#include "wand/drawing-wand.h"
#include "wand/magick-wand.h"
#include "wand/pixel-iterator.h"
#include "wand/pixel-wand.h"
typedef struct _DrawingWand
*DrawContext;
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 *)
magick_attribute((deprecated));
extern WandExport double
DrawGetFillAlpha(const DrawingWand *) magick_attribute((deprecated)),
DrawGetStrokeAlpha(const DrawingWand *) magick_attribute((deprecated));
extern WandExport DrawInfo
*DrawPeekGraphicWand(const DrawingWand *) magick_attribute((deprecated));
extern WandExport char
*MagickDescribeImage(MagickWand *) magick_attribute((deprecated)),
*MagickGetImageAttribute(MagickWand *,const char *)
magick_attribute((deprecated)),
*PixelIteratorGetException(const PixelIterator *,ExceptionType *)
magick_attribute((deprecated));
extern WandExport ssize_t
MagickGetImageIndex(MagickWand *) magick_attribute((deprecated));
extern WandExport MagickBooleanType
DuplexTransferPixelViewIterator(PixelView *,PixelView *,PixelView *,
DuplexTransferPixelViewMethod,void *) magick_attribute((deprecated)),
GetPixelViewIterator(PixelView *,GetPixelViewMethod,void *)
magick_attribute((deprecated)),
IsPixelView(const PixelView *) magick_attribute((deprecated)),
MagickClipPathImage(MagickWand *,const char *,const MagickBooleanType)
magick_attribute((deprecated)),
MagickColorFloodfillImage(MagickWand *,const PixelWand *,const double,
const PixelWand *,const ssize_t,const ssize_t)
magick_attribute((deprecated)),
MagickGetImageChannelExtrema(MagickWand *,const ChannelType,size_t *,
size_t *) magick_attribute((deprecated)),
MagickGetImageExtrema(MagickWand *,size_t *,size_t *)
magick_attribute((deprecated)),
MagickGetImageMatte(MagickWand *) magick_attribute((deprecated)),
MagickGetImagePixels(MagickWand *,const ssize_t,const ssize_t,const size_t,
const size_t,const char *,const StorageType,void *)
magick_attribute((deprecated)),
MagickMapImage(MagickWand *,const MagickWand *,const MagickBooleanType)
magick_attribute((deprecated)),
MagickMatteFloodfillImage(MagickWand *,const double,const double,
const PixelWand *,const ssize_t,const ssize_t)
magick_attribute((deprecated)),
MagickMedianFilterImage(MagickWand *,const double)
magick_attribute((deprecated)),
MagickModeImage(MagickWand *,const double) magick_attribute((deprecated)),
MagickReduceNoiseImage(MagickWand *,const double)
magick_attribute((deprecated)),
MagickRemapImage(MagickWand *,const MagickWand *,const DitherMethod),
MagickOpaqueImage(MagickWand *,const PixelWand *,const PixelWand *,
const double) magick_attribute((deprecated)),
MagickPaintFloodfillImage(MagickWand *,const ChannelType,const PixelWand *,
const double,const PixelWand *,const ssize_t,const ssize_t)
magick_attribute((deprecated)),
MagickPaintOpaqueImage(MagickWand *,const PixelWand *,const PixelWand *,
const double) magick_attribute((deprecated)),
MagickPaintOpaqueImageChannel(MagickWand *,const ChannelType,
const PixelWand *,const PixelWand *,const double)
magick_attribute((deprecated)),
MagickPaintTransparentImage(MagickWand *,const PixelWand *,const double,
const double) magick_attribute((deprecated)),
MagickRecolorImage(MagickWand *,const size_t,const double *)
magick_attribute((deprecated)),
MagickSetImageAttribute(MagickWand *,const char *,const char *)
magick_attribute((deprecated)),
MagickSetImageIndex(MagickWand *,const ssize_t)
magick_attribute((deprecated)),
MagickSetImageOption(MagickWand *,const char *,const char *,const char *)
magick_attribute((deprecated)),
MagickSetImagePixels(MagickWand *,const ssize_t,const ssize_t,const size_t,
const size_t,const char *,const StorageType,const void *)
magick_attribute((deprecated)),
MagickTransparentImage(MagickWand *,const PixelWand *,const double,
const double) magick_attribute((deprecated)),
SetPixelViewIterator(PixelView *,SetPixelViewMethod,void *)
magick_attribute((deprecated)),
TransferPixelViewIterator(PixelView *,PixelView *,TransferPixelViewMethod,
void *) magick_attribute((deprecated)),
UpdatePixelViewIterator(PixelView *,UpdatePixelViewMethod,void *)
magick_attribute((deprecated));
extern WandExport MagickWand
*GetPixelViewWand(const PixelView *) magick_attribute((deprecated)),
*MagickAverageImages(MagickWand *) magick_attribute((deprecated)),
*MagickFlattenImages(MagickWand *) magick_attribute((deprecated)),
*MagickMaximumImages(MagickWand *) magick_attribute((deprecated)),
*MagickMinimumImages(MagickWand *) magick_attribute((deprecated)),
*MagickMosaicImages(MagickWand *) magick_attribute((deprecated)),
*MagickRegionOfInterestImage(MagickWand *,const size_t,const size_t,
const ssize_t,const ssize_t) magick_attribute((deprecated));
extern WandExport MagickSizeType
MagickGetImageSize(MagickWand *) magick_attribute((deprecated));
extern WandExport PixelView
*ClonePixelView(const PixelView *) magick_attribute((deprecated)),
*DestroyPixelView(PixelView *) magick_attribute((deprecated)),
*NewPixelView(MagickWand *) magick_attribute((deprecated)),
*NewPixelViewRegion(MagickWand *,const ssize_t,const ssize_t,const size_t,
const size_t) magick_attribute((deprecated));
extern WandExport PixelWand
**GetPixelViewPixels(const PixelView *) magick_attribute((deprecated)),
**PixelGetNextRow(PixelIterator *) magick_attribute((deprecated));
extern WandExport size_t
GetPixelViewHeight(const PixelView *) magick_attribute((deprecated)),
GetPixelViewWidth(const PixelView *) magick_attribute((deprecated));
extern WandExport ssize_t
GetPixelViewX(const PixelView *) magick_attribute((deprecated)),
GetPixelViewY(const PixelView *) magick_attribute((deprecated));
extern WandExport unsigned char
*MagickWriteImageBlob(MagickWand *,size_t *) magick_attribute((deprecated));
extern WandExport void
DrawPopGraphicContext(DrawingWand *) magick_attribute((deprecated)),
DrawPushGraphicContext(DrawingWand *) magick_attribute((deprecated)),
DrawSetFillAlpha(DrawingWand *,const double) magick_attribute((deprecated)),
DrawSetStrokeAlpha(DrawingWand *,const double) magick_attribute((deprecated));
#endif
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

1898
ImageMagick/wand/display.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand display command-line method.
*/
#ifndef _MAGICKWAND_DISPLAY_H
#define _MAGICKWAND_DISPLAY_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
DisplayImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,218 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand drawing wand methods.
*/
#ifndef _MAGICKWAND_DRAWING_WAND_H
#define _MAGICKWAND_DRAWING_WAND_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#include "wand/pixel-wand.h"
typedef struct _DrawingWand
DrawingWand;
extern WandExport AlignType
DrawGetTextAlignment(const DrawingWand *);
extern WandExport char
*DrawGetClipPath(const DrawingWand *),
*DrawGetException(const DrawingWand *,ExceptionType *),
*DrawGetFont(const DrawingWand *),
*DrawGetFontFamily(const DrawingWand *),
*DrawGetTextEncoding(const DrawingWand *),
*DrawGetVectorGraphics(DrawingWand *);
extern WandExport ClipPathUnits
DrawGetClipUnits(const DrawingWand *);
extern WandExport DecorationType
DrawGetTextDecoration(const DrawingWand *);
extern WandExport double
DrawGetFillOpacity(const DrawingWand *),
DrawGetFontSize(const DrawingWand *),
DrawGetOpacity(const DrawingWand *),
*DrawGetStrokeDashArray(const DrawingWand *,size_t *),
DrawGetStrokeDashOffset(const DrawingWand *),
DrawGetStrokeOpacity(const DrawingWand *),
DrawGetStrokeWidth(const DrawingWand *),
DrawGetTextKerning(DrawingWand *),
DrawGetTextInterlineSpacing(DrawingWand *),
DrawGetTextInterwordSpacing(DrawingWand *);
extern WandExport DrawInfo
*PeekDrawingWand(const DrawingWand *);
extern WandExport DrawingWand
*CloneDrawingWand(const DrawingWand *),
*DestroyDrawingWand(DrawingWand *),
*DrawAllocateWand(const DrawInfo *,Image *),
*NewDrawingWand(void);
extern WandExport ExceptionType
DrawGetExceptionType(const DrawingWand *);
extern WandExport FillRule
DrawGetClipRule(const DrawingWand *),
DrawGetFillRule(const DrawingWand *);
extern WandExport GravityType
DrawGetGravity(const DrawingWand *);
extern WandExport LineCap
DrawGetStrokeLineCap(const DrawingWand *);
extern WandExport LineJoin
DrawGetStrokeLineJoin(const DrawingWand *);
extern WandExport MagickBooleanType
DrawClearException(DrawingWand *),
DrawComposite(DrawingWand *,const CompositeOperator,const double,const double,
const double,const double,MagickWand *),
DrawGetFontResolution(const DrawingWand *,double *,double *),
DrawGetStrokeAntialias(const DrawingWand *),
DrawGetTextAntialias(const DrawingWand *),
DrawPopPattern(DrawingWand *),
DrawPushPattern(DrawingWand *,const char *,const double,const double,
const double,const double),
DrawRender(DrawingWand *),
DrawSetClipPath(DrawingWand *,const char *),
DrawSetFillPatternURL(DrawingWand *,const char *),
DrawSetFont(DrawingWand *,const char *),
DrawSetFontFamily(DrawingWand *,const char *),
DrawSetFontResolution(DrawingWand *,const double,const double),
DrawSetStrokeDashArray(DrawingWand *,const size_t,const double *),
DrawSetStrokePatternURL(DrawingWand *,const char *),
DrawSetVectorGraphics(DrawingWand *,const char *),
IsDrawingWand(const DrawingWand *),
PopDrawingWand(DrawingWand *),
PushDrawingWand(DrawingWand *);
extern WandExport StretchType
DrawGetFontStretch(const DrawingWand *);
extern WandExport StyleType
DrawGetFontStyle(const DrawingWand *);
extern WandExport size_t
DrawGetFontWeight(const DrawingWand *),
DrawGetStrokeMiterLimit(const DrawingWand *);
extern WandExport void
ClearDrawingWand(DrawingWand *),
DrawAffine(DrawingWand *,const AffineMatrix *),
DrawAnnotation(DrawingWand *,const double,const double,const unsigned char *),
DrawArc(DrawingWand *,const double,const double,const double,const double,
const double,const double),
DrawBezier(DrawingWand *,const size_t,const PointInfo *),
DrawGetBorderColor(const DrawingWand *,PixelWand *),
DrawCircle(DrawingWand *,const double,const double,const double,const double),
DrawColor(DrawingWand *,const double,const double,const PaintMethod),
DrawComment(DrawingWand *,const char *),
DrawEllipse(DrawingWand *,const double,const double,const double,const double,
const double,const double),
DrawGetFillColor(const DrawingWand *,PixelWand *),
DrawGetStrokeColor(const DrawingWand *,PixelWand *),
DrawSetTextKerning(DrawingWand *,const double),
DrawSetTextInterlineSpacing(DrawingWand *,const double),
DrawSetTextInterwordSpacing(DrawingWand *,const double),
DrawGetTextUnderColor(const DrawingWand *,PixelWand *),
DrawLine(DrawingWand *,const double, const double,const double,const double),
DrawMatte(DrawingWand *,const double,const double,const PaintMethod),
DrawPathClose(DrawingWand *),
DrawPathCurveToAbsolute(DrawingWand *,const double,const double,const double,
const double,const double,const double),
DrawPathCurveToRelative(DrawingWand *,const double,const double,const double,
const double,const double, const double),
DrawPathCurveToQuadraticBezierAbsolute(DrawingWand *,const double,
const double,const double,const double),
DrawPathCurveToQuadraticBezierRelative(DrawingWand *,const double,
const double,const double,const double),
DrawPathCurveToQuadraticBezierSmoothAbsolute(DrawingWand *,const double,
const double),
DrawPathCurveToQuadraticBezierSmoothRelative(DrawingWand *,const double,
const double),
DrawPathCurveToSmoothAbsolute(DrawingWand *,const double,const double,
const double,const double),
DrawPathCurveToSmoothRelative(DrawingWand *,const double,const double,
const double,const double),
DrawPathEllipticArcAbsolute(DrawingWand *,const double,const double,
const double,const MagickBooleanType,const MagickBooleanType,const double,
const double),
DrawPathEllipticArcRelative(DrawingWand *,const double,const double,
const double,const MagickBooleanType,const MagickBooleanType,const double,
const double),
DrawPathFinish(DrawingWand *),
DrawPathLineToAbsolute(DrawingWand *,const double,const double),
DrawPathLineToRelative(DrawingWand *,const double,const double),
DrawPathLineToHorizontalAbsolute(DrawingWand *,const double),
DrawPathLineToHorizontalRelative(DrawingWand *,const double),
DrawPathLineToVerticalAbsolute(DrawingWand *,const double),
DrawPathLineToVerticalRelative(DrawingWand *,const double),
DrawPathMoveToAbsolute(DrawingWand *,const double,const double),
DrawPathMoveToRelative(DrawingWand *,const double,const double),
DrawPathStart(DrawingWand *),
DrawPoint(DrawingWand *,const double,const double),
DrawPolygon(DrawingWand *,const size_t,const PointInfo *),
DrawPolyline(DrawingWand *,const size_t,const PointInfo *),
DrawPopClipPath(DrawingWand *),
DrawPopDefs(DrawingWand *),
DrawPushClipPath(DrawingWand *,const char *),
DrawPushDefs(DrawingWand *),
DrawRectangle(DrawingWand *,const double,const double,const double,
const double),
DrawResetVectorGraphics(DrawingWand *),
DrawRotate(DrawingWand *,const double),
DrawRoundRectangle(DrawingWand *,double,double,double,double,double,double),
DrawScale(DrawingWand *,const double,const double),
DrawSetBorderColor(DrawingWand *,const PixelWand *),
DrawSetClipRule(DrawingWand *,const FillRule),
DrawSetClipUnits(DrawingWand *,const ClipPathUnits),
DrawSetFillColor(DrawingWand *,const PixelWand *),
DrawSetFillOpacity(DrawingWand *,const double),
DrawSetFillRule(DrawingWand *,const FillRule),
DrawSetFontSize(DrawingWand *,const double),
DrawSetFontStretch(DrawingWand *,const StretchType),
DrawSetFontStyle(DrawingWand *,const StyleType),
DrawSetFontWeight(DrawingWand *,const size_t),
DrawSetGravity(DrawingWand *,const GravityType),
DrawSetOpacity(DrawingWand *,const double),
DrawSetStrokeAntialias(DrawingWand *,const MagickBooleanType),
DrawSetStrokeColor(DrawingWand *,const PixelWand *),
DrawSetStrokeDashOffset(DrawingWand *,const double dashoffset),
DrawSetStrokeLineCap(DrawingWand *,const LineCap),
DrawSetStrokeLineJoin(DrawingWand *,const LineJoin),
DrawSetStrokeMiterLimit(DrawingWand *,const size_t),
DrawSetStrokeOpacity(DrawingWand *, const double),
DrawSetStrokeWidth(DrawingWand *,const double),
DrawSetTextAlignment(DrawingWand *,const AlignType),
DrawSetTextAntialias(DrawingWand *,const MagickBooleanType),
DrawSetTextDecoration(DrawingWand *,const DecorationType),
DrawSetTextEncoding(DrawingWand *,const char *),
DrawSetTextUnderColor(DrawingWand *,const PixelWand *),
DrawSetViewbox(DrawingWand *,ssize_t,ssize_t,ssize_t,ssize_t),
DrawSkewX(DrawingWand *,const double),
DrawSkewY(DrawingWand *,const double),
DrawTranslate(DrawingWand *,const double,const double);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

857
ImageMagick/wand/identify.c Normal file
View file

@ -0,0 +1,857 @@
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% IIIII DDDD EEEEE N N TTTTT IIIII FFFFF Y Y %
% I D D E NN N T I F Y Y %
% I D D EEE N N N T I FFF Y %
% I D D E N NN T I F Y %
% IIIII DDDD EEEEE N N T IIIII F Y %
% %
% %
% Identify an Image Format and Characteristics. %
% %
% Software Design %
% John Cristy %
% September 1994 %
% %
% %
% Copyright 1999-2013 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. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% The identify program describes the format and characteristics of one or more
% image files. It also reports if an image is incomplete or corrupt. The
% information returned includes the image number, the file name, the width and
% height of the image, whether the image is colormapped or not, the number of
% colors in the image, the number of bytes in the image, the format of the
% image (JPEG, PNM, etc.), and finally the number of seconds it took to read
% and process the image. Many more attributes are available with the verbose
% option.
%
*/
/*
Include declarations.
*/
#include "wand/studio.h"
#include "wand/MagickWand.h"
#include "wand/mogrify-private.h"
#include "magick/string-private.h"
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
+ I d e n t i f y I m a g e C o m m a n d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% IdentifyImageCommand() describes the format and characteristics of one or
% more image files. It will also report if an image is incomplete or corrupt.
% The information displayed includes the scene number, the file name, the
% width and height of the image, whether the image is colormapped or not,
% the number of colors in the image, the number of bytes in the image, the
% format of the image (JPEG, PNM, etc.), and finally the number of seconds
% it took to read and process the image.
%
% The format of the IdentifyImageCommand method is:
%
% MagickBooleanType IdentifyImageCommand(ImageInfo *image_info,int argc,
% char **argv,char **metadata,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% o image_info: the image info.
%
% o argc: the number of elements in the argument vector.
%
% o argv: A text array containing the command line arguments.
%
% o metadata: any metadata is returned here.
%
% o exception: return any errors or warnings in this structure.
%
*/
static MagickBooleanType IdentifyUsage(void)
{
const char
**p;
static const char
*miscellaneous[]=
{
"-debug events display copious debugging information",
"-help print program options",
"-list type print a list of supported option arguments",
"-log format format of debugging information",
"-version print version information",
(char *) NULL
},
*operators[]=
{
"-negate replace every pixel with its complementary color ",
(char *) NULL
},
*settings[]=
{
"-alpha option on, activate, off, deactivate, set, opaque, copy",
" transparent, extract, background, or shape",
"-antialias remove pixel-aliasing",
"-authenticate password",
" decipher image with this password",
"-channel type apply option to select image channels",
"-colorspace type alternate image colorspace",
"-crop geometry cut out a rectangular region of the image",
"-define format:option",
" define one or more image format options",
"-density geometry horizontal and vertical density of the image",
"-depth value image depth",
"-endian type endianness (MSB or LSB) of the image",
"-extract geometry extract area from image",
"-features distance analyze image features (e.g. contrast, correlation)",
"-format \"string\" output formatted image characteristics",
"-fuzz distance colors within this distance are considered equal",
"-gamma value of gamma correction",
"-interlace type type of image interlacing scheme",
"-interpolate method pixel color interpolation method",
"-limit type value pixel cache resource limit",
"-monitor monitor progress",
"-ping efficiently determine image attributes",
"-quiet suppress all warning messages",
"-regard-warnings pay attention to warning messages",
"-respect-parentheses settings remain in effect until parenthesis boundary",
"-sampling-factor geometry",
" horizontal and vertical sampling factor",
"-seed value seed a new sequence of pseudo-random numbers",
"-set attribute value set an image attribute",
"-size geometry width and height of image",
"-strip strip image of all profiles and comments",
"-unique display the number of unique colors in the image",
"-units type the units of image resolution",
"-verbose print detailed information about the image",
"-virtual-pixel method",
" virtual pixel access method",
(char *) NULL
};
ListMagickVersion(stdout);
(void) printf("Usage: %s [options ...] file [ [options ...] "
"file ... ]\n",GetClientName());
(void) printf("\nImage Settings:\n");
for (p=settings; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
(void) printf("\nImage Operators:\n");
for (p=operators; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
(void) printf("\nMiscellaneous Options:\n");
for (p=miscellaneous; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
(void) printf(
"\nBy default, the image format of `file' is determined by its magic\n");
(void) printf(
"number. To specify a particular image format, precede the filename\n");
(void) printf(
"with an image format name and a colon (i.e. ps:image) or specify the\n");
(void) printf(
"image type as the filename suffix (i.e. image.ps). Specify 'file' as\n");
(void) printf("'-' for standard input or output.\n");
return(MagickFalse);
}
WandExport MagickBooleanType IdentifyImageCommand(ImageInfo *image_info,
int argc,char **argv,char **metadata,ExceptionInfo *exception)
{
#define DestroyIdentify() \
{ \
DestroyImageStack(); \
for (i=0; i < (ssize_t) argc; i++) \
argv[i]=DestroyString(argv[i]); \
argv=(char **) RelinquishMagickMemory(argv); \
}
#define ThrowIdentifyException(asperity,tag,option) \
{ \
(void) ThrowMagickException(exception,GetMagickModule(),asperity,tag,"`%s'", \
option); \
DestroyIdentify(); \
return(MagickFalse); \
}
#define ThrowIdentifyInvalidArgumentException(option,argument) \
{ \
(void) ThrowMagickException(exception,GetMagickModule(),OptionError, \
"InvalidArgument","`%s': %s",option,argument); \
DestroyIdentify(); \
return(MagickFalse); \
}
const char
*format,
*option;
Image
*image;
ImageStack
image_stack[MaxImageStackDepth+1];
MagickBooleanType
fire,
pend,
respect_parenthesis;
MagickStatusType
status;
register ssize_t
i;
size_t
count;
ssize_t
j,
k;
/*
Set defaults.
*/
assert(image_info != (ImageInfo *) NULL);
assert(image_info->signature == MagickSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(exception != (ExceptionInfo *) NULL);
if (argc == 2)
{
option=argv[1];
if ((LocaleCompare("version",option+1) == 0) ||
(LocaleCompare("-version",option+1) == 0))
{
ListMagickVersion(stdout);
return(MagickFalse);
}
}
if (argc < 2)
return(IdentifyUsage());
count=0;
format=NULL;
j=1;
k=0;
NewImageStack();
option=(char *) NULL;
pend=MagickFalse;
respect_parenthesis=MagickFalse;
status=MagickTrue;
/*
Identify an image.
*/
ReadCommandlLine(argc,&argv);
status=ExpandFilenames(&argc,&argv);
if (status == MagickFalse)
ThrowIdentifyException(ResourceLimitError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
image_info->ping=MagickTrue;
for (i=1; i < (ssize_t) argc; i++)
{
option=argv[i];
if (LocaleCompare(option,"(") == 0)
{
FireImageStack(MagickFalse,MagickTrue,pend);
if (k == MaxImageStackDepth)
ThrowIdentifyException(OptionError,"ParenthesisNestedTooDeeply",
option);
PushImageStack();
continue;
}
if (LocaleCompare(option,")") == 0)
{
FireImageStack(MagickFalse,MagickTrue,MagickTrue);
if (k == 0)
ThrowIdentifyException(OptionError,"UnableToParseExpression",option);
PopImageStack();
continue;
}
if (IsCommandOption(option) == MagickFalse)
{
char
*filename;
Image
*images;
ImageInfo
*identify_info;
/*
Read input image.
*/
FireImageStack(MagickFalse,MagickFalse,pend);
identify_info=CloneImageInfo(image_info);
identify_info->verbose=MagickFalse;
filename=argv[i];
if ((LocaleCompare(filename,"--") == 0) && (i < (ssize_t) (argc-1)))
filename=argv[++i];
(void) SetImageOption(image_info,"filename",filename);
(void) CopyMagickString(identify_info->filename,filename,MaxTextExtent);
if (identify_info->ping != MagickFalse)
images=PingImages(identify_info,exception);
else
images=ReadImages(identify_info,exception);
identify_info=DestroyImageInfo(identify_info);
status&=(images != (Image *) NULL) &&
(exception->severity < ErrorException);
if (images == (Image *) NULL)
continue;
AppendImageStack(images);
FinalizeImageSettings(image_info,image,MagickFalse);
for ( ; image != (Image *) NULL; image=GetNextImageInList(image))
{
if (image->scene == 0)
image->scene=count++;
if (format == (char *) NULL)
{
(void) IdentifyImage(image,stdout,image_info->verbose);
continue;
}
if (metadata != (char **) NULL)
{
char
*text;
text=InterpretImageProperties(image_info,image,format);
if (text == (char *) NULL)
ThrowIdentifyException(ResourceLimitError,
"MemoryAllocationFailed",GetExceptionMessage(errno));
(void) ConcatenateString(&(*metadata),text);
text=DestroyString(text);
if (LocaleCompare(format,"%n") == 0)
break;
}
}
RemoveAllImageStack();
continue;
}
pend=image != (Image *) NULL ? MagickTrue : MagickFalse;
switch (*(option+1))
{
case 'a':
{
if (LocaleCompare("alpha",option+1) == 0)
{
ssize_t
type;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
type=ParseCommandOption(MagickAlphaOptions,MagickFalse,argv[i]);
if (type < 0)
ThrowIdentifyException(OptionError,"UnrecognizedAlphaChannelType",
argv[i]);
break;
}
if (LocaleCompare("antialias",option+1) == 0)
break;
if (LocaleCompare("authenticate",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'c':
{
if (LocaleCompare("cache",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("channel",option+1) == 0)
{
ssize_t
channel;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
channel=ParseChannelOption(argv[i]);
if (channel < 0)
ThrowIdentifyException(OptionError,"UnrecognizedChannelType",
argv[i]);
break;
}
if (LocaleCompare("colorspace",option+1) == 0)
{
ssize_t
colorspace;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
colorspace=ParseCommandOption(MagickColorspaceOptions,
MagickFalse,argv[i]);
if (colorspace < 0)
ThrowIdentifyException(OptionError,"UnrecognizedColorspace",
argv[i]);
break;
}
if (LocaleCompare("crop",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
image_info->ping=MagickFalse;
break;
}
if (LocaleCompare("concurrent",option+1) == 0)
break;
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'd':
{
if (LocaleCompare("debug",option+1) == 0)
{
ssize_t
event;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
event=ParseCommandOption(MagickLogEventOptions,MagickFalse,argv[i]);
if (event < 0)
ThrowIdentifyException(OptionError,"UnrecognizedEventType",
argv[i]);
(void) SetLogEventMask(argv[i]);
break;
}
if (LocaleCompare("define",option+1) == 0)
{
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (*option == '+')
{
const char
*define;
define=GetImageOption(image_info,argv[i]);
if (define == (const char *) NULL)
ThrowIdentifyException(OptionError,"NoSuchOption",argv[i]);
break;
}
break;
}
if (LocaleCompare("density",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("depth",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("duration",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'e':
{
if (LocaleCompare("endian",option+1) == 0)
{
ssize_t
endian;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
endian=ParseCommandOption(MagickEndianOptions,MagickFalse,
argv[i]);
if (endian < 0)
ThrowIdentifyException(OptionError,"UnrecognizedEndianType",
argv[i]);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'f':
{
if (LocaleCompare("features",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("format",option+1) == 0)
{
format=(char *) NULL;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
format=argv[i];
break;
}
if (LocaleCompare("fuzz",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'g':
{
if (LocaleCompare("gamma",option+1) == 0)
{
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'h':
{
if ((LocaleCompare("help",option+1) == 0) ||
(LocaleCompare("-help",option+1) == 0))
return(IdentifyUsage());
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'i':
{
if (LocaleCompare("interlace",option+1) == 0)
{
ssize_t
interlace;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
interlace=ParseCommandOption(MagickInterlaceOptions,MagickFalse,
argv[i]);
if (interlace < 0)
ThrowIdentifyException(OptionError,
"UnrecognizedInterlaceType",argv[i]);
break;
}
if (LocaleCompare("interpolate",option+1) == 0)
{
ssize_t
interpolate;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
interpolate=ParseCommandOption(MagickInterpolateOptions,MagickFalse,
argv[i]);
if (interpolate < 0)
ThrowIdentifyException(OptionError,
"UnrecognizedInterpolateMethod",argv[i]);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'l':
{
if (LocaleCompare("limit",option+1) == 0)
{
char
*p;
double
value;
ssize_t
resource;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
resource=ParseCommandOption(MagickResourceOptions,MagickFalse,
argv[i]);
if (resource < 0)
ThrowIdentifyException(OptionError,"UnrecognizedResourceType",
argv[i]);
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("list",option+1) == 0)
{
ssize_t
list;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
list=ParseCommandOption(MagickListOptions,MagickFalse,argv[i]);
if (list < 0)
ThrowIdentifyException(OptionError,"UnrecognizedListType",
argv[i]);
status=MogrifyImageInfo(image_info,(int) (i-j+1),(const char **)
argv+j,exception);
DestroyIdentify();
return(status != 0 ? MagickFalse : MagickTrue);
}
if (LocaleCompare("log",option+1) == 0)
{
if (*option == '+')
break;
i++;
if ((i == (ssize_t) argc) ||
(strchr(argv[i],'%') == (char *) NULL))
ThrowIdentifyException(OptionError,"MissingArgument",option);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'm':
{
if (LocaleCompare("matte",option+1) == 0)
break;
if (LocaleCompare("monitor",option+1) == 0)
break;
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'n':
{
if (LocaleCompare("negate",option+1) == 0)
break;
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'p':
{
if (LocaleCompare("ping",option+1) == 0)
break;
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'q':
{
if (LocaleCompare("quiet",option+1) == 0)
break;
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'r':
{
if (LocaleCompare("regard-warnings",option+1) == 0)
break;
if (LocaleNCompare("respect-parentheses",option+1,17) == 0)
{
respect_parenthesis=(*option == '-') ? MagickTrue : MagickFalse;
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 's':
{
if (LocaleCompare("sampling-factor",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("seed",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("set",option+1) == 0)
{
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
break;
}
if (LocaleCompare("size",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("strip",option+1) == 0)
break;
if (LocaleCompare("support",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowIdentifyInvalidArgumentException(option,argv[i]);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'u':
{
if (LocaleCompare("unique",option+1) == 0)
break;
if (LocaleCompare("units",option+1) == 0)
{
ssize_t
units;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
units=ParseCommandOption(MagickResolutionOptions,MagickFalse,
argv[i]);
if (units < 0)
ThrowIdentifyException(OptionError,"UnrecognizedUnitsType",
argv[i]);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case 'v':
{
if (LocaleCompare("verbose",option+1) == 0)
break;
if (LocaleCompare("virtual-pixel",option+1) == 0)
{
ssize_t
method;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowIdentifyException(OptionError,"MissingArgument",option);
method=ParseCommandOption(MagickVirtualPixelOptions,MagickFalse,
argv[i]);
if (method < 0)
ThrowIdentifyException(OptionError,
"UnrecognizedVirtualPixelMethod",argv[i]);
break;
}
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
case '?':
break;
default:
ThrowIdentifyException(OptionError,"UnrecognizedOption",option)
}
fire=(GetCommandOptionFlags(MagickCommandOptions,MagickFalse,option) &
FireOptionFlag) == 0 ? MagickFalse : MagickTrue;
if (fire != MagickFalse)
FireImageStack(MagickFalse,MagickTrue,MagickTrue);
}
if (k != 0)
ThrowIdentifyException(OptionError,"UnbalancedParenthesis",argv[i]);
if (i != (ssize_t) argc)
ThrowIdentifyException(OptionError,"MissingAnImageFilename",argv[i]);
DestroyIdentify();
return(status != 0 ? MagickTrue : MagickFalse);
}

View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand identify command-line method.
*/
#ifndef _MAGICKWAND_IDENTIFY_H
#define _MAGICKWAND_IDENTIFY_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
IdentifyImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

1302
ImageMagick/wand/import.c Normal file

File diff suppressed because it is too large Load diff

32
ImageMagick/wand/import.h Normal file
View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand import command-line method.
*/
#ifndef _MAGICKWAND_IMPORT_H
#define _MAGICKWAND_IMPORT_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
ImportImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

View file

@ -0,0 +1,4 @@
VERS_1.0 {
global:
*;
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,449 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand image Methods.
*/
#ifndef _MAGICKWAND_MAGICK_IMAGE_H
#define _MAGICKWAND_MAGICK_IMAGE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport ChannelFeatures
*MagickGetImageChannelFeatures(MagickWand *,const size_t);
extern WandExport ChannelStatistics
*MagickGetImageChannelStatistics(MagickWand *);
extern WandExport char
*MagickGetImageFilename(MagickWand *),
*MagickGetImageFormat(MagickWand *),
*MagickGetImageSignature(MagickWand *),
*MagickIdentifyImage(MagickWand *);
extern WandExport ColorspaceType
MagickGetImageColorspace(MagickWand *);
extern WandExport CompositeOperator
MagickGetImageCompose(MagickWand *);
extern WandExport CompressionType
MagickGetImageCompression(MagickWand *);
extern WandExport DisposeType
MagickGetImageDispose(MagickWand *);
extern WandExport double
*MagickGetImageChannelDistortions(MagickWand *,const MagickWand *,
const MetricType),
MagickGetImageFuzz(MagickWand *),
MagickGetImageGamma(MagickWand *),
MagickGetImageTotalInkDensity(MagickWand *);
extern WandExport EndianType
MagickGetImageEndian(MagickWand *);
extern WandExport GravityType
MagickGetImageGravity(MagickWand *);
extern WandExport Image
*MagickDestroyImage(Image *),
*GetImageFromMagickWand(const MagickWand *);
extern WandExport ImageType
MagickGetImageType(MagickWand *);
extern WandExport InterlaceType
MagickGetImageInterlaceScheme(MagickWand *);
extern WandExport InterpolatePixelMethod
MagickGetImageInterpolateMethod(MagickWand *);
extern WandExport MagickBooleanType
MagickAdaptiveBlurImage(MagickWand *,const double,const double),
MagickAdaptiveBlurImageChannel(MagickWand *,const ChannelType,const double,
const double),
MagickAdaptiveResizeImage(MagickWand *,const size_t,const size_t),
MagickAdaptiveSharpenImage(MagickWand *,const double,const double),
MagickAdaptiveSharpenImageChannel(MagickWand *,const ChannelType,const double,
const double),
MagickAdaptiveThresholdImage(MagickWand *,const size_t,const size_t,
const ssize_t),
MagickAddImage(MagickWand *,const MagickWand *),
MagickAddNoiseImage(MagickWand *,const NoiseType),
MagickAddNoiseImageChannel(MagickWand *,const ChannelType,const NoiseType),
MagickAffineTransformImage(MagickWand *,const DrawingWand *),
MagickAnnotateImage(MagickWand *,const DrawingWand *,const double,
const double,const double,const char *),
MagickAnimateImages(MagickWand *,const char *),
MagickAutoGammaImage(MagickWand *),
MagickAutoGammaImageChannel(MagickWand *,const ChannelType),
MagickAutoLevelImage(MagickWand *),
MagickAutoLevelImageChannel(MagickWand *,const ChannelType),
MagickBlackThresholdImage(MagickWand *,const PixelWand *),
MagickBlueShiftImage(MagickWand *,const double),
MagickBlurImage(MagickWand *,const double,const double),
MagickBlurImageChannel(MagickWand *,const ChannelType,const double,
const double),
MagickBorderImage(MagickWand *,const PixelWand *,const size_t,const size_t),
MagickBrightnessContrastImage(MagickWand *,const double,const double),
MagickBrightnessContrastImageChannel(MagickWand *,const ChannelType,
const double,const double),
MagickCharcoalImage(MagickWand *,const double,const double),
MagickChopImage(MagickWand *,const size_t,const size_t,const ssize_t,
const ssize_t),
MagickClampImage(MagickWand *),
MagickClampImageChannel(MagickWand *,const ChannelType),
MagickClipImage(MagickWand *),
MagickClipImagePath(MagickWand *,const char *,const MagickBooleanType),
MagickClutImage(MagickWand *,const MagickWand *),
MagickClutImageChannel(MagickWand *,const ChannelType,const MagickWand *),
MagickColorDecisionListImage(MagickWand *,const char *),
MagickColorizeImage(MagickWand *,const PixelWand *,const PixelWand *),
MagickColorMatrixImage(MagickWand *,const KernelInfo *),
MagickCommentImage(MagickWand *,const char *),
MagickCompositeImage(MagickWand *,const MagickWand *,const CompositeOperator,
const ssize_t,const ssize_t),
MagickCompositeLayers(MagickWand *,const MagickWand *,const CompositeOperator,
const ssize_t,const ssize_t),
MagickCompositeImageChannel(MagickWand *,const ChannelType,const MagickWand *, const CompositeOperator,const ssize_t,const ssize_t),
MagickConstituteImage(MagickWand *,const size_t,const size_t,const char *,
const StorageType,const void *),
MagickContrastImage(MagickWand *,const MagickBooleanType),
MagickContrastStretchImage(MagickWand *,const double,const double),
MagickContrastStretchImageChannel(MagickWand *,const ChannelType,const double,
const double),
MagickConvolveImage(MagickWand *,const size_t,const double *),
MagickConvolveImageChannel(MagickWand *,const ChannelType,const size_t,
const double *),
MagickCropImage(MagickWand *,const size_t,const size_t,const ssize_t,
const ssize_t),
MagickCycleColormapImage(MagickWand *,const ssize_t),
MagickDecipherImage(MagickWand *,const char *),
MagickDeskewImage(MagickWand *,const double),
MagickDespeckleImage(MagickWand *),
MagickDisplayImage(MagickWand *,const char *),
MagickDisplayImages(MagickWand *,const char *),
MagickDistortImage(MagickWand *,const DistortImageMethod,const size_t,
const double *,const MagickBooleanType),
MagickDrawImage(MagickWand *,const DrawingWand *),
MagickEdgeImage(MagickWand *,const double),
MagickEmbossImage(MagickWand *,const double,const double),
MagickEncipherImage(MagickWand *,const char *),
MagickEnhanceImage(MagickWand *),
MagickEqualizeImage(MagickWand *),
MagickEqualizeImageChannel(MagickWand *,const ChannelType),
MagickEvaluateImage(MagickWand *,const MagickEvaluateOperator,const double),
MagickEvaluateImageChannel(MagickWand *,const ChannelType,
const MagickEvaluateOperator,const double),
MagickExportImagePixels(MagickWand *,const ssize_t,const ssize_t,
const size_t,const size_t,const char *,const StorageType,void *),
MagickExtentImage(MagickWand *,const size_t,const size_t,const ssize_t,
const ssize_t),
MagickFilterImage(MagickWand *,const KernelInfo *),
MagickFilterImageChannel(MagickWand *,const ChannelType,const KernelInfo *),
MagickFlipImage(MagickWand *),
MagickFloodfillPaintImage(MagickWand *,const ChannelType,const PixelWand *,
const double,const PixelWand *,const ssize_t,const ssize_t,
const MagickBooleanType),
MagickFlopImage(MagickWand *),
MagickForwardFourierTransformImage(MagickWand *,const MagickBooleanType),
MagickFrameImage(MagickWand *,const PixelWand *,const size_t,const size_t,
const ssize_t,const ssize_t),
MagickFunctionImage(MagickWand *,const MagickFunction,const size_t,
const double *),
MagickFunctionImageChannel(MagickWand *,const ChannelType,
const MagickFunction,const size_t,const double *),
MagickGammaImage(MagickWand *,const double),
MagickGammaImageChannel(MagickWand *,const ChannelType,const double),
MagickGaussianBlurImage(MagickWand *,const double,const double),
MagickGaussianBlurImageChannel(MagickWand *,const ChannelType,const double,
const double),
MagickGetImageAlphaChannel(MagickWand *),
MagickGetImageBackgroundColor(MagickWand *,PixelWand *),
MagickGetImageBluePrimary(MagickWand *,double *,double *),
MagickGetImageBorderColor(MagickWand *,PixelWand *),
MagickGetImageChannelDistortion(MagickWand *,const MagickWand *,
const ChannelType,const MetricType,double *),
MagickGetImageChannelKurtosis(MagickWand *,const ChannelType,double *,
double *),
MagickGetImageChannelMean(MagickWand *,const ChannelType,double *,double *),
MagickGetImageChannelRange(MagickWand *,const ChannelType,double *,double *),
MagickGetImageColormapColor(MagickWand *,const size_t,PixelWand *),
MagickGetImageDistortion(MagickWand *,const MagickWand *,const MetricType,
double *),
MagickGetImageGreenPrimary(MagickWand *,double *,double *),
MagickGetImageMatteColor(MagickWand *,PixelWand *),
MagickGetImageLength(MagickWand *,MagickSizeType *),
MagickGetImagePage(MagickWand *,size_t *,size_t *,ssize_t *,
ssize_t *),
MagickGetImagePixelColor(MagickWand *,const ssize_t,const ssize_t,
PixelWand *),
MagickGetImageRange(MagickWand *,double *,double *),
MagickGetImageRedPrimary(MagickWand *,double *,double *),
MagickGetImageResolution(MagickWand *,double *,double *),
MagickGetImageWhitePoint(MagickWand *,double *,double *),
MagickHaldClutImage(MagickWand *,const MagickWand *),
MagickHaldClutImageChannel(MagickWand *,const ChannelType,const MagickWand *),
MagickHasNextImage(MagickWand *),
MagickHasPreviousImage(MagickWand *),
MagickImplodeImage(MagickWand *,const double),
MagickImportImagePixels(MagickWand *,const ssize_t,const ssize_t,const size_t,
const size_t,const char *,const StorageType,const void *),
MagickInverseFourierTransformImage(MagickWand *,MagickWand *,
const MagickBooleanType),
MagickLabelImage(MagickWand *,const char *),
MagickLevelImage(MagickWand *,const double,const double,const double),
MagickLevelImageChannel(MagickWand *,const ChannelType,const double,
const double,const double),
MagickLinearStretchImage(MagickWand *,const double,const double),
MagickLiquidRescaleImage(MagickWand *,const size_t,const size_t,const double,
const double),
MagickMagnifyImage(MagickWand *),
MagickMedianFilterImage(MagickWand *,const double),
MagickMinifyImage(MagickWand *),
MagickModeImage(MagickWand *,const double),
MagickModulateImage(MagickWand *,const double,const double,const double),
MagickMorphologyImage(MagickWand *,MorphologyMethod,const ssize_t,
KernelInfo *),
MagickMorphologyImageChannel(MagickWand *,const ChannelType,MorphologyMethod,
const ssize_t,KernelInfo *),
MagickMotionBlurImage(MagickWand *,const double,const double,const double),
MagickMotionBlurImageChannel(MagickWand *,const ChannelType,const double,
const double,const double),
MagickNegateImage(MagickWand *,const MagickBooleanType),
MagickNegateImageChannel(MagickWand *,const ChannelType,
const MagickBooleanType),
MagickNewImage(MagickWand *,const size_t,const size_t,const PixelWand *),
MagickNextImage(MagickWand *),
MagickNormalizeImage(MagickWand *),
MagickNormalizeImageChannel(MagickWand *,const ChannelType),
MagickOilPaintImage(MagickWand *,const double),
MagickOpaquePaintImage(MagickWand *,const PixelWand *,const PixelWand *,
const double,const MagickBooleanType),
MagickOpaquePaintImageChannel(MagickWand *,const ChannelType,
const PixelWand *,const PixelWand *,const double,const MagickBooleanType),
MagickOrderedPosterizeImage(MagickWand *,const char *),
MagickOrderedPosterizeImageChannel(MagickWand *,const ChannelType,
const char *),
MagickOptimizeImageTransparency(MagickWand *),
MagickTransparentPaintImage(MagickWand *,const PixelWand *,
const double,const double,const MagickBooleanType invert),
MagickPingImage(MagickWand *,const char *),
MagickPingImageBlob(MagickWand *,const void *,const size_t),
MagickPingImageFile(MagickWand *,FILE *),
MagickPolaroidImage(MagickWand *,const DrawingWand *,const double),
MagickPosterizeImage(MagickWand *,const size_t,const MagickBooleanType),
MagickPreviousImage(MagickWand *),
MagickQuantizeImage(MagickWand *,const size_t,const ColorspaceType,
const size_t,const MagickBooleanType,const MagickBooleanType),
MagickQuantizeImages(MagickWand *,const size_t,const ColorspaceType,
const size_t,const MagickBooleanType,const MagickBooleanType),
MagickRadialBlurImage(MagickWand *,const double),
MagickRadialBlurImageChannel(MagickWand *,const ChannelType,const double),
MagickRaiseImage(MagickWand *,const size_t,const size_t,const ssize_t,
const ssize_t,const MagickBooleanType),
MagickRandomThresholdImage(MagickWand *,const double,const double),
MagickRandomThresholdImageChannel(MagickWand *,const ChannelType,const double,
const double),
MagickReadImage(MagickWand *,const char *),
MagickReadImageBlob(MagickWand *,const void *,const size_t),
MagickReadImageFile(MagickWand *,FILE *),
MagickReduceNoiseImage(MagickWand *,const double),
MagickRemapImage(MagickWand *,const MagickWand *,const DitherMethod),
MagickRemoveImage(MagickWand *),
MagickResampleImage(MagickWand *,const double,const double,const FilterTypes,
const double),
MagickResetImagePage(MagickWand *,const char *),
MagickResizeImage(MagickWand *,const size_t,const size_t,const FilterTypes,
const double),
MagickRollImage(MagickWand *,const ssize_t,const ssize_t),
MagickRotateImage(MagickWand *,const PixelWand *,const double),
MagickSampleImage(MagickWand *,const size_t,const size_t),
MagickScaleImage(MagickWand *,const size_t,const size_t),
MagickSegmentImage(MagickWand *,const ColorspaceType,const MagickBooleanType,
const double,const double),
MagickSelectiveBlurImage(MagickWand *,const double,const double,const double),
MagickSelectiveBlurImageChannel(MagickWand *,const ChannelType,const double,
const double,const double),
MagickSeparateImageChannel(MagickWand *,const ChannelType),
MagickSepiaToneImage(MagickWand *,const double),
MagickSetImage(MagickWand *,const MagickWand *),
MagickSetImageAlphaChannel(MagickWand *,const AlphaChannelType),
MagickSetImageBackgroundColor(MagickWand *,const PixelWand *),
MagickSetImageBias(MagickWand *,const double),
MagickSetImageBluePrimary(MagickWand *,const double,const double),
MagickSetImageBorderColor(MagickWand *,const PixelWand *),
MagickSetImageChannelDepth(MagickWand *,const ChannelType,const size_t),
MagickSetImageClipMask(MagickWand *,const MagickWand *),
MagickSetImageColor(MagickWand *,const PixelWand *),
MagickSetImageColormapColor(MagickWand *,const size_t,
const PixelWand *),
MagickSetImageColorspace(MagickWand *,const ColorspaceType),
MagickSetImageCompose(MagickWand *,const CompositeOperator),
MagickSetImageCompression(MagickWand *,const CompressionType),
MagickSetImageDelay(MagickWand *,const size_t),
MagickSetImageDepth(MagickWand *,const size_t),
MagickSetImageDispose(MagickWand *,const DisposeType),
MagickSetImageCompressionQuality(MagickWand *,const size_t),
MagickSetImageEndian(MagickWand *,const EndianType),
MagickSetImageExtent(MagickWand *,const size_t,const size_t),
MagickSetImageFilename(MagickWand *,const char *),
MagickSetImageFormat(MagickWand *,const char *),
MagickSetImageFuzz(MagickWand *,const double),
MagickSetImageGamma(MagickWand *,const double),
MagickSetImageGravity(MagickWand *,const GravityType),
MagickSetImageGreenPrimary(MagickWand *,const double,const double),
MagickSetImageInterlaceScheme(MagickWand *,const InterlaceType),
MagickSetImageInterpolateMethod(MagickWand *,const InterpolatePixelMethod),
MagickSetImageIterations(MagickWand *,const size_t),
MagickSetImageMatte(MagickWand *,const MagickBooleanType),
MagickSetImageMatteColor(MagickWand *,const PixelWand *),
MagickSetImageOpacity(MagickWand *,const double),
MagickSetImageOrientation(MagickWand *,const OrientationType),
MagickSetImagePage(MagickWand *,const size_t,const size_t,const ssize_t,
const ssize_t),
MagickSetImageRedPrimary(MagickWand *,const double,const double),
MagickSetImageRenderingIntent(MagickWand *,const RenderingIntent),
MagickSetImageResolution(MagickWand *,const double,const double),
MagickSetImageScene(MagickWand *,const size_t),
MagickSetImageTicksPerSecond(MagickWand *,const ssize_t),
MagickSetImageType(MagickWand *,const ImageType),
MagickSetImageUnits(MagickWand *,const ResolutionType),
MagickSetImageWhitePoint(MagickWand *,const double,const double),
MagickShadeImage(MagickWand *,const MagickBooleanType,const double,
const double),
MagickShadowImage(MagickWand *,const double,const double,const ssize_t,
const ssize_t),
MagickSharpenImage(MagickWand *,const double,const double),
MagickSharpenImageChannel(MagickWand *,const ChannelType,const double,
const double),
MagickShaveImage(MagickWand *,const size_t,const size_t),
MagickShearImage(MagickWand *,const PixelWand *,const double,const double),
MagickSigmoidalContrastImage(MagickWand *,const MagickBooleanType,
const double,const double),
MagickSigmoidalContrastImageChannel(MagickWand *,const ChannelType,
const MagickBooleanType,const double,const double),
MagickSketchImage(MagickWand *,const double,const double,const double),
MagickSolarizeImage(MagickWand *,const double),
MagickSolarizeImageChannel(MagickWand *,const ChannelType,const double),
MagickSparseColorImage(MagickWand *,const ChannelType,const SparseColorMethod,
const size_t,const double *),
MagickSpliceImage(MagickWand *,const size_t,const size_t,const ssize_t,
const ssize_t),
MagickSpreadImage(MagickWand *,const double),
MagickStatisticImage(MagickWand *,const StatisticType,const size_t,
const size_t),
MagickStatisticImageChannel(MagickWand *,const ChannelType,
const StatisticType,const size_t,const size_t),
MagickStripImage(MagickWand *),
MagickSwirlImage(MagickWand *,const double),
MagickTintImage(MagickWand *,const PixelWand *,const PixelWand *),
MagickTransformImageColorspace(MagickWand *,const ColorspaceType),
MagickTransposeImage(MagickWand *),
MagickTransverseImage(MagickWand *),
MagickThresholdImage(MagickWand *,const double),
MagickThresholdImageChannel(MagickWand *,const ChannelType,const double),
MagickThumbnailImage(MagickWand *,const size_t,const size_t),
MagickTrimImage(MagickWand *,const double),
MagickUniqueImageColors(MagickWand *),
MagickUnsharpMaskImage(MagickWand *,const double,const double,const double,
const double),
MagickUnsharpMaskImageChannel(MagickWand *,const ChannelType,const double,
const double,const double,const double),
MagickVignetteImage(MagickWand *,const double,const double,const ssize_t,
const ssize_t),
MagickWaveImage(MagickWand *,const double,const double),
MagickWhiteThresholdImage(MagickWand *,const PixelWand *),
MagickWriteImage(MagickWand *,const char *),
MagickWriteImageFile(MagickWand *,FILE *),
MagickWriteImages(MagickWand *,const char *,const MagickBooleanType),
MagickWriteImagesFile(MagickWand *,FILE *);
WandExport MagickProgressMonitor
MagickSetImageProgressMonitor(MagickWand *,const MagickProgressMonitor,
void *);
extern WandExport MagickWand
*MagickAppendImages(MagickWand *,const MagickBooleanType),
*MagickCoalesceImages(MagickWand *),
*MagickCombineImages(MagickWand *,const ChannelType),
*MagickCompareImageChannels(MagickWand *,const MagickWand *,const ChannelType,
const MetricType,double *),
*MagickCompareImages(MagickWand *,const MagickWand *,const MetricType,
double *),
*MagickCompareImageLayers(MagickWand *,const ImageLayerMethod),
*MagickDeconstructImages(MagickWand *),
*MagickEvaluateImages(MagickWand *,const MagickEvaluateOperator),
*MagickFxImage(MagickWand *,const char *),
*MagickFxImageChannel(MagickWand *,const ChannelType,const char *),
*MagickGetImage(MagickWand *),
*MagickGetImageClipMask(MagickWand *),
*MagickGetImageRegion(MagickWand *,const size_t,const size_t,const ssize_t,
const ssize_t),
*MagickMergeImageLayers(MagickWand *,const ImageLayerMethod),
*MagickMorphImages(MagickWand *,const size_t),
*MagickMontageImage(MagickWand *,const DrawingWand *,const char *,
const char *,const MontageMode,const char *),
*MagickOptimizeImageLayers(MagickWand *),
*MagickPreviewImages(MagickWand *wand,const PreviewType),
*MagickSimilarityImage(MagickWand *,const MagickWand *,RectangleInfo *,
double *),
*MagickSmushImages(MagickWand *,const MagickBooleanType,const ssize_t),
*MagickSteganoImage(MagickWand *,const MagickWand *,const ssize_t),
*MagickStereoImage(MagickWand *,const MagickWand *),
*MagickTextureImage(MagickWand *,const MagickWand *),
*MagickTransformImage(MagickWand *,const char *,const char *);
extern WandExport OrientationType
MagickGetImageOrientation(MagickWand *);
extern WandExport PixelWand
**MagickGetImageHistogram(MagickWand *,size_t *);
extern WandExport RenderingIntent
MagickGetImageRenderingIntent(MagickWand *);
extern WandExport ResolutionType
MagickGetImageUnits(MagickWand *);
extern WandExport size_t
MagickGetImageColors(MagickWand *),
MagickGetImageCompressionQuality(MagickWand *),
MagickGetImageDelay(MagickWand *),
MagickGetImageChannelDepth(MagickWand *,const ChannelType),
MagickGetImageDepth(MagickWand *),
MagickGetImageHeight(MagickWand *),
MagickGetImageIterations(MagickWand *),
MagickGetImageScene(MagickWand *),
MagickGetImageTicksPerSecond(MagickWand *),
MagickGetImageWidth(MagickWand *),
MagickGetNumberImages(MagickWand *);
extern WandExport unsigned char
*MagickGetImageBlob(MagickWand *,size_t *),
*MagickGetImagesBlob(MagickWand *,size_t *);
extern WandExport VirtualPixelMethod
MagickGetImageVirtualPixelMethod(MagickWand *),
MagickSetImageVirtualPixelMethod(MagickWand *,const VirtualPixelMethod);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,142 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand property, options, and profile methods.
*/
#ifndef _MAGICKWAND_MAGICK_PROPERTY_H
#define _MAGICKWAND_MAGICK_PROPERTY_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport char
*MagickGetFilename(const MagickWand *),
*MagickGetFormat(MagickWand *),
*MagickGetFont(MagickWand *),
*MagickGetHomeURL(void),
*MagickGetImageArtifact(MagickWand *,const char *),
**MagickGetImageArtifacts(MagickWand *,const char *,size_t *),
**MagickGetImageProfiles(MagickWand *,const char *,size_t *),
*MagickGetImageProperty(MagickWand *,const char *),
**MagickGetImageProperties(MagickWand *,const char *,size_t *),
*MagickGetOption(MagickWand *,const char *),
**MagickGetOptions(MagickWand *,const char *,size_t *),
*MagickQueryConfigureOption(const char *),
**MagickQueryConfigureOptions(const char *,size_t *),
**MagickQueryFonts(const char *,size_t *),
**MagickQueryFormats(const char *,size_t *);
extern WandExport ColorspaceType
MagickGetColorspace(MagickWand *);
extern WandExport CompressionType
MagickGetCompression(MagickWand *);
extern WandExport const char
*MagickGetCopyright(void),
*MagickGetPackageName(void),
*MagickGetQuantumDepth(size_t *),
*MagickGetQuantumRange(size_t *),
*MagickGetReleaseDate(void),
*MagickGetVersion(size_t *);
extern WandExport double
MagickGetPointsize(MagickWand *),
*MagickGetSamplingFactors(MagickWand *,size_t *),
*MagickQueryFontMetrics(MagickWand *,const DrawingWand *,const char *),
*MagickQueryMultilineFontMetrics(MagickWand *,const DrawingWand *,
const char *);
extern WandExport GravityType
MagickGetGravity(MagickWand *);
extern WandExport ImageType
MagickGetType(MagickWand *);
extern WandExport InterlaceType
MagickGetInterlaceScheme(MagickWand *);
extern WandExport InterpolatePixelMethod
MagickGetInterpolateMethod(MagickWand *);
extern WandExport OrientationType
MagickGetOrientation(MagickWand *);
extern WandExport MagickBooleanType
MagickDeleteImageArtifact(MagickWand *,const char *),
MagickDeleteImageProperty(MagickWand *,const char *),
MagickDeleteOption(MagickWand *,const char *),
MagickGetAntialias(const MagickWand *),
MagickGetPage(const MagickWand *,size_t *,size_t *,ssize_t *,ssize_t *),
MagickGetResolution(const MagickWand *,double *,double *),
MagickGetSize(const MagickWand *,size_t *,size_t *),
MagickGetSizeOffset(const MagickWand *,ssize_t *),
MagickProfileImage(MagickWand *,const char *,const void *,const size_t),
MagickSetAntialias(MagickWand *,const MagickBooleanType),
MagickSetBackgroundColor(MagickWand *,const PixelWand *),
MagickSetColorspace(MagickWand *,const ColorspaceType),
MagickSetCompression(MagickWand *,const CompressionType),
MagickSetCompressionQuality(MagickWand *,const size_t),
MagickSetDepth(MagickWand *,const size_t),
MagickSetExtract(MagickWand *,const char *),
MagickSetFilename(MagickWand *,const char *),
MagickSetFormat(MagickWand *,const char *),
MagickSetFont(MagickWand *,const char *),
MagickSetGravity(MagickWand *,const GravityType),
MagickSetImageArtifact(MagickWand *,const char *,const char *),
MagickSetImageProfile(MagickWand *,const char *,const void *,const size_t),
MagickSetImageProperty(MagickWand *,const char *,const char *),
MagickSetInterlaceScheme(MagickWand *,const InterlaceType),
MagickSetInterpolateMethod(MagickWand *,const InterpolatePixelMethod),
MagickSetOption(MagickWand *,const char *,const char *),
MagickSetOrientation(MagickWand *,const OrientationType),
MagickSetPage(MagickWand *,const size_t,const size_t,const ssize_t,
const ssize_t),
MagickSetPassphrase(MagickWand *,const char *),
MagickSetPointsize(MagickWand *,const double),
MagickSetResolution(MagickWand *,const double,const double),
MagickSetResourceLimit(const ResourceType type,const MagickSizeType limit),
MagickSetSamplingFactors(MagickWand *,const size_t,const double *),
MagickSetSize(MagickWand *,const size_t,const size_t),
MagickSetSizeOffset(MagickWand *,const size_t,const size_t,const ssize_t),
MagickSetType(MagickWand *,const ImageType);
extern WandExport MagickProgressMonitor
MagickSetProgressMonitor(MagickWand *,const MagickProgressMonitor,void *);
extern WandExport MagickSizeType
MagickGetResource(const ResourceType),
MagickGetResourceLimit(const ResourceType);
extern WandExport PixelWand
*MagickGetBackgroundColor(MagickWand *);
extern WandExport OrientationType
MagickGetOrientationType(MagickWand *);
extern WandExport size_t
MagickGetCompressionQuality(MagickWand *);
extern WandExport unsigned char
*MagickGetImageProfile(MagickWand *,const char *,size_t *),
*MagickRemoveImageProfile(MagickWand *,const char *,size_t *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

View file

@ -0,0 +1,66 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
ImageMagick pixel wand API.
*/
#ifndef _MAGICKWAND_MAGICK_WAND_PRIVATE_H
#define _MAGICKWAND_MAGICK_WAND_PRIVATE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#define DegreesToRadians(x) (MagickPI*(x)/180.0)
#define MagickPI 3.14159265358979323846264338327950288419716939937510
#define MagickWandId "MagickWand"
#define QuantumTick(i,span) ((MagickBooleanType) ((((i) & ((i)-1)) == 0) || \
(((i) & 0xfff) == 0) || \
((MagickOffsetType) (i) == ((MagickOffsetType) (span)-1))))
#define RadiansToDegrees(x) (180.0*(x)/MagickPI)
struct _MagickWand
{
size_t
id;
char
name[MaxTextExtent];
ExceptionInfo
*exception;
ImageInfo
*image_info;
QuantizeInfo
*quantize_info;
Image
*images;
MagickBooleanType
insert_before,
image_pending,
debug;
size_t
signature;
};
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand API (deprecated, use magick-wand.h instead).
*/
#ifndef _MAGICKWAND_MAGICK_WAND_DEPRECATED_H
#define _MAGICKWAND_MAGICK_WAND_DEPRECATED_H
#include "wand/MagickWand.h"
#endif

View file

@ -0,0 +1,24 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand API (deprecated, use magick-wand.h instead).
*/
#ifndef _MAGICKWAND_MAGICK_WAND_DEPRECATED_H
#define _MAGICKWAND_MAGICK_WAND_DEPRECATED_H
#include "wand/MagickWand.h"
#endif

View file

@ -0,0 +1,130 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand method attribute.
*/
#ifndef _MAGICKWAND_METHOD_ATTRIBUTE_H
#define _MAGICKWAND_METHOD_ATTRIBUTE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#if defined(__BORLANDC__) && defined(_DLL)
# pragma message("BCBMagick lib DLL export interface")
# define _MAGICKDLL_
# define _MAGICKLIB_
# define MAGICKCORE_MODULES_SUPPORT
# undef MAGICKCORE_BUILD_MODULES
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
# define WandPrivate
# if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB)
# define _MAGICKDLL_
# endif
# if defined(_MAGICKDLL_)
# if defined(_VISUALC_)
# pragma warning( disable: 4273 ) /* Disable the dll linkage warnings */
# endif
# if !defined(_MAGICKLIB_)
# if defined(__GNUC__)
# define WandExport __attribute__ ((dllimport))
# else
# define WandExport __declspec(dllimport)
# endif
# if defined(_VISUALC_)
# pragma message( "MagickWand lib DLL import interface" )
# endif
# else
# if defined(__GNUC__)
# define WandExport __attribute__ ((dllexport))
# else
# define WandExport __declspec(dllexport)
# endif
# if defined(_VISUALC_)
# pragma message( "MagickWand lib DLL export interface" )
# endif
# endif
# else
# define WandExport
# if defined(_VISUALC_)
# pragma message( "MagickWand lib static interface" )
# endif
# endif
# if defined(_DLL) && !defined(_LIB)
# if defined(_VISUALC_)
# pragma message( "MagickWand module DLL export interface" )
# endif
# else
# if defined(_VISUALC_)
# pragma message( "MagickWand module static interface" )
# endif
# endif
# define WandGlobal __declspec(thread)
# if defined(_VISUALC_)
# pragma warning(disable : 4018)
# pragma warning(disable : 4068)
# pragma warning(disable : 4244)
# pragma warning(disable : 4142)
# pragma warning(disable : 4800)
# pragma warning(disable : 4786)
# pragma warning(disable : 4996)
# endif
#else
# if __GNUC__ >= 4
# define WandExport __attribute__ ((visibility ("default")))
# define WandPrivate __attribute__ ((visibility ("hidden")))
# else
# define WandExport
# define WandPrivate
# endif
# define WandGlobal
#endif
#define WandSignature 0xabacadabUL
#if !defined(MaxTextExtent)
# define MaxTextExtent 4096
#endif
#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
# define wand_aligned(x) __attribute__((aligned(x)))
# define wand_attribute __attribute__
# define wand_unused(x) wand_unused_ ## x __attribute__((unused))
#else
# define wand_aligned(x) /* nothing */
# define wand_attribute(x) /* nothing */
# define wand_unused(x) x
#endif
#if (((__GNUC__) > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
# define wand_alloc_size(x) __attribute__((__alloc_size__(x)))
# define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y)))
# define wand_cold_spot __attribute__((__cold__))
# define wand_hot_spot __attribute__((__hot__))
#else
# define wand_alloc_size(x) /* nothing */
# define wand_alloc_sizes(x,y) /* nothing */
# define wand_cold_spot
# define wand_hot_spot
#endif
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

View file

@ -0,0 +1,125 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand mogrify command-line private methods.
*/
#ifndef _MAGICKWAND_MOGRIFY_PRIVATE_H
#define _MAGICKWAND_MOGRIFY_PRIVATE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#define AppendImageStack(images) \
{ \
(void) SyncImagesSettings(image_info,images); \
AppendImageToList(&image_stack[k].image,images); \
image=image_stack[k].image; \
}
#define DestroyImageStack() \
{ \
while (k > 0) \
PopImageStack(); \
image_stack[k].image=DestroyImageList(image_stack[k].image); \
image_stack[k].image_info=DestroyImageInfo(image_stack[k].image_info); \
}
#define FinalizeImageSettings(image_info,image,advance) \
{ \
FireImageStack(MagickTrue,advance,MagickTrue); \
if (image != (Image *) NULL) \
{ \
InheritException(exception,&(image)->exception); \
(void) SyncImagesSettings(image_info,image); \
} \
}
#define FireImageStack(postfix,advance,fire) \
if ((j <= i) && (i < (ssize_t) argc)) \
{ \
if (image_stack[k].image == (Image *) NULL) \
status&=MogrifyImageInfo(image_stack[k].image_info,(int) (i-j+1), \
(const char **) (argv+j),exception); \
else \
if ((fire) != MagickFalse) \
{ \
status&=MogrifyImages(image_stack[k].image_info,postfix,(int) \
(i-j+1),(const char **) (argv+j),&image_stack[k].image, \
exception); \
image=image_stack[k].image; \
if ((advance) != MagickFalse) \
j=i+1; \
pend=MagickFalse; \
} \
}
#define MaxImageStackDepth 32
#define NewImageStack() \
{ \
image_stack[0].image_info=CloneImageInfo(image_info); \
image_stack[0].image=NewImageList(); \
image_info=image_stack[0].image_info; \
image=image_stack[0].image; \
}
#define PushImageStack() \
{ \
k++; \
image_stack[k].image_info=CloneImageInfo(image_stack[k-1].image_info); \
image_stack[k].image=NewImageList(); \
image_info=image_stack[k].image_info; \
image=image_stack[k].image; \
}
#define PopImageStack() \
{ \
if (respect_parenthesis == MagickFalse) \
{ \
image_stack[k-1].image_info=DestroyImageInfo(image_stack[k-1].image_info); \
image_stack[k-1].image_info=CloneImageInfo(image_stack[k].image_info); \
} \
image_stack[k].image_info=DestroyImageInfo(image_stack[k].image_info); \
AppendImageToList(&image_stack[k-1].image,image_stack[k].image); \
k--; \
image_info=image_stack[k].image_info; \
image=image_stack[k].image; \
}
#define QuantumTick(i,span) ((MagickBooleanType) ((((i) & ((i)-1)) == 0) || \
(((i) & 0xfff) == 0) || \
((MagickOffsetType) (i) == ((MagickOffsetType) (span)-1))))
#define RemoveImageStack(images) \
{ \
images=RemoveFirstImageFromList(&image_stack[k].image); \
image=image_stack[k].image; \
}
#define RemoveAllImageStack() \
{ \
if (image_stack[k].image != (Image *) NULL) \
image_stack[k].image=DestroyImageList(image_stack[k].image); \
}
#define SetImageStack(image) \
{ \
image_stack[k].image=(image); \
}
typedef struct _ImageStack
{
ImageInfo
*image_info;
Image
*image;
} ImageStack;
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

8439
ImageMagick/wand/mogrify.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,43 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand mogrify command-line method.
*/
#ifndef _MAGICKWAND_MOGRIFY_H
#define _MAGICKWAND_MOGRIFY_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
typedef MagickBooleanType
(*MagickCommand)(ImageInfo *,int,char **,char **,ExceptionInfo *);
extern WandExport MagickBooleanType
MagickCommandGenesis(ImageInfo *,MagickCommand,int,char **,char **,
ExceptionInfo *),
MogrifyImage(ImageInfo *,const int,const char **,Image **,ExceptionInfo *),
MogrifyImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *),
MogrifyImageInfo(ImageInfo *,const int,const char **,ExceptionInfo *),
MogrifyImageList(ImageInfo *,const int,const char **,Image **,
ExceptionInfo *),
MogrifyImages(ImageInfo *,const MagickBooleanType,const int,const char **,
Image **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

1816
ImageMagick/wand/montage.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand montage command-line method.
*/
#ifndef _MAGICKWAND_MONTAGE_H
#define _MAGICKWAND_MONTAGE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
MontageImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,68 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Pixel Iterator Methods.
*/
#ifndef _MAGICKWAND_PIXEL_ITERATOR_H
#define _MAGICKWAND_PIXEL_ITERATOR_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#include "wand/magick-wand.h"
#include "wand/pixel-wand.h"
typedef struct _PixelIterator
PixelIterator;
extern WandExport char
*PixelGetIteratorException(const PixelIterator *,ExceptionType *);
extern WandExport ExceptionType
PixelGetIteratorExceptionType(const PixelIterator *);
extern WandExport MagickBooleanType
IsPixelIterator(const PixelIterator *),
PixelClearIteratorException(PixelIterator *),
PixelSetIteratorRow(PixelIterator *,const ssize_t),
PixelSyncIterator(PixelIterator *);
extern WandExport PixelIterator
*ClonePixelIterator(const PixelIterator *),
*DestroyPixelIterator(PixelIterator *),
*NewPixelIterator(MagickWand *),
*NewPixelRegionIterator(MagickWand *,const ssize_t,const ssize_t,const size_t,
const size_t);
extern WandExport PixelWand
**PixelGetCurrentIteratorRow(PixelIterator *,size_t *),
**PixelGetNextIteratorRow(PixelIterator *,size_t *),
**PixelGetPreviousIteratorRow(PixelIterator *,size_t *);
extern WandExport ssize_t
PixelGetIteratorRow(PixelIterator *);
extern WandExport void
ClearPixelIterator(PixelIterator *),
PixelResetIterator(PixelIterator *),
PixelSetFirstIteratorRow(PixelIterator *),
PixelSetLastIteratorRow(PixelIterator *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

View file

@ -0,0 +1,29 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MAgickWand pixel wand private methods.
*/
#ifndef _MAGICKWAND_PIXEL_WAND_PRIVATE_H
#define _MAGICKWAND_PIXEL_WAND_PRIVATE_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,114 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand pixel wand methods.
*/
#ifndef _MAGICKWAND_PIXEL_WAND_H
#define _MAGICKWAND_PIXEL_WAND_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
typedef struct _PixelWand
PixelWand;
extern WandExport char
*PixelGetColorAsNormalizedString(const PixelWand *),
*PixelGetColorAsString(const PixelWand *),
*PixelGetException(const PixelWand *,ExceptionType *);
extern WandExport double
PixelGetAlpha(const PixelWand *),
PixelGetBlack(const PixelWand *),
PixelGetBlue(const PixelWand *),
PixelGetCyan(const PixelWand *),
PixelGetFuzz(const PixelWand *),
PixelGetGreen(const PixelWand *),
PixelGetMagenta(const PixelWand *),
PixelGetOpacity(const PixelWand *),
PixelGetRed(const PixelWand *),
PixelGetYellow(const PixelWand *);
extern WandExport ExceptionType
PixelGetExceptionType(const PixelWand *);
extern WandExport IndexPacket
PixelGetIndex(const PixelWand *);
extern WandExport MagickBooleanType
IsPixelWand(const PixelWand *),
IsPixelWandSimilar(PixelWand *,PixelWand *,const double),
PixelClearException(PixelWand *),
PixelSetColor(PixelWand *,const char *);
extern WandExport PixelWand
*ClonePixelWand(const PixelWand *),
**ClonePixelWands(const PixelWand **,const size_t),
*DestroyPixelWand(PixelWand *),
**DestroyPixelWands(PixelWand **,const size_t),
*NewPixelWand(void),
**NewPixelWands(const size_t);
extern WandExport Quantum
PixelGetAlphaQuantum(const PixelWand *),
PixelGetBlackQuantum(const PixelWand *),
PixelGetBlueQuantum(const PixelWand *),
PixelGetCyanQuantum(const PixelWand *),
PixelGetGreenQuantum(const PixelWand *),
PixelGetMagentaQuantum(const PixelWand *),
PixelGetOpacityQuantum(const PixelWand *),
PixelGetRedQuantum(const PixelWand *),
PixelGetYellowQuantum(const PixelWand *);
extern WandExport size_t
PixelGetColorCount(const PixelWand *);
extern WandExport void
ClearPixelWand(PixelWand *),
PixelGetHSL(const PixelWand *,double *,double *,double *),
PixelGetMagickColor(const PixelWand *,MagickPixelPacket *),
PixelGetQuantumColor(const PixelWand *,PixelPacket *),
PixelSetAlpha(PixelWand *,const double),
PixelSetAlphaQuantum(PixelWand *,const Quantum),
PixelSetBlack(PixelWand *,const double),
PixelSetBlackQuantum(PixelWand *,const Quantum),
PixelSetBlue(PixelWand *,const double),
PixelSetBlueQuantum(PixelWand *,const Quantum),
PixelSetColorFromWand(PixelWand *,const PixelWand *),
PixelSetColorCount(PixelWand *,const size_t),
PixelSetCyan(PixelWand *,const double),
PixelSetCyanQuantum(PixelWand *,const Quantum),
PixelSetFuzz(PixelWand *,const double),
PixelSetGreen(PixelWand *,const double),
PixelSetGreenQuantum(PixelWand *,const Quantum),
PixelSetHSL(PixelWand *,const double,const double,const double),
PixelSetIndex(PixelWand *,const IndexPacket),
PixelSetMagenta(PixelWand *,const double),
PixelSetMagentaQuantum(PixelWand *,const Quantum),
PixelSetMagickColor(PixelWand *,const MagickPixelPacket *),
PixelSetOpacity(PixelWand *,const double),
PixelSetOpacityQuantum(PixelWand *,const Quantum),
PixelSetQuantumColor(PixelWand *,const PixelPacket *),
PixelSetRed(PixelWand *,const double),
PixelSetRedQuantum(PixelWand *,const Quantum),
PixelSetYellow(PixelWand *,const double),
PixelSetYellowQuantum(PixelWand *,const Quantum);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

761
ImageMagick/wand/stream.c Normal file
View file

@ -0,0 +1,761 @@
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% SSSSS TTTTT RRRR EEEEE AAA M M %
% SS T R R E A A MM MM %
% SSS T RRRR EEE AAAAA M M M %
% SS T R R E A A M M %
% SSSSS T R R EEEEE A A M M %
% %
% %
% Stream Image to a Raw Image Format %
% %
% Software Design %
% John Cristy %
% July 1992 %
% %
% %
% Copyright 1999-2013 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. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Stream is a lightweight tool to stream one or more pixel components of the
% image or portion of the image to your choice of storage formats. It writes
% the pixel components as they are read from the input image a row at a time
% making stream desirable when working with large images or when you require
% raw pixel components.
%
*/
/*
Include declarations.
*/
#include "wand/studio.h"
#include "wand/MagickWand.h"
#include "wand/mogrify-private.h"
#include "magick/stream-private.h"
#include "magick/string-private.h"
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% S t r e a m I m a g e C o m m a n d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% StreamImageCommand() is a lightweight method designed to extract pixels
% from large image files to a raw format using a minimum of system resources.
% The entire image or any regular portion of the image can be extracted.
%
% The format of the StreamImageCommand method is:
%
% MagickBooleanType StreamImageCommand(ImageInfo *image_info,int argc,
% char **argv,char **metadata,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% o image_info: the image info.
%
% o argc: the number of elements in the argument vector.
%
% o argv: A text array containing the command line arguments.
%
% o metadata: any metadata is returned here.
%
% o exception: return any errors or warnings in this structure.
%
*/
static MagickBooleanType StreamUsage(void)
{
const char
**p;
static const char
*miscellaneous[]=
{
"-debug events display copious debugging information",
"-help print program options",
"-list type print a list of supported option arguments",
"-log format format of debugging information",
"-version print version information",
(char *) NULL
},
*settings[]=
{
"-authenticate password",
" decipher image with this password",
"-channel type apply option to select image channels",
"-colorspace type alternate image colorspace",
"-compress type type of pixel compression when writing the image",
"-define format:option",
" define one or more image format options",
"-density geometry horizontal and vertical density of the image",
"-depth value image depth",
"-extract geometry extract area from image",
"-identify identify the format and characteristics of the image",
"-interlace type type of image interlacing scheme",
"-interpolate method pixel color interpolation method",
"-limit type value pixel cache resource limit",
"-map components one or more pixel components",
"-monitor monitor progress",
"-quantize colorspace reduce colors in this colorspace",
"-quiet suppress all warning messages",
"-regard-warnings pay attention to warning messages",
"-respect-parentheses settings remain in effect until parenthesis boundary",
"-sampling-factor geometry",
" horizontal and vertical sampling factor",
"-seed value seed a new sequence of pseudo-random numbers",
"-set attribute value set an image attribute",
"-size geometry width and height of image",
"-storage-type type pixel storage type",
"-synchronize synchronize image to storage device",
"-taint declare the image as modified",
"-transparent-color color",
" transparent color",
"-verbose print detailed information about the image",
"-virtual-pixel method",
" virtual pixel access method",
(char *) NULL
};
ListMagickVersion(stdout);
(void) printf("Usage: %s [options ...] input-image raw-image\n",
GetClientName());
(void) printf("\nImage Settings:\n");
for (p=settings; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
(void) printf("\nMiscellaneous Options:\n");
for (p=miscellaneous; *p != (char *) NULL; p++)
(void) printf(" %s\n",*p);
(void) printf(
"\nBy default, the image format of `file' is determined by its magic\n");
(void) printf(
"number. To specify a particular image format, precede the filename\n");
(void) printf(
"with an image format name and a colon (i.e. ps:image) or specify the\n");
(void) printf(
"image type as the filename suffix (i.e. image.ps). Specify 'file' as\n");
(void) printf("'-' for standard input or output.\n");
return(MagickFalse);
}
WandExport MagickBooleanType StreamImageCommand(ImageInfo *image_info,
int argc,char **argv,char **metadata,ExceptionInfo *exception)
{
#define DestroyStream() \
{ \
DestroyImageStack(); \
stream_info=DestroyStreamInfo(stream_info); \
for (i=0; i < (ssize_t) argc; i++) \
argv[i]=DestroyString(argv[i]); \
argv=(char **) RelinquishMagickMemory(argv); \
}
#define ThrowStreamException(asperity,tag,option) \
{ \
(void) ThrowMagickException(exception,GetMagickModule(),asperity,tag,"`%s'", \
option); \
DestroyStream(); \
return(MagickFalse); \
}
#define ThrowStreamInvalidArgumentException(option,argument) \
{ \
(void) ThrowMagickException(exception,GetMagickModule(),OptionError, \
"InvalidArgument","`%s': %s",option,argument); \
DestroyStream(); \
return(MagickFalse); \
}
char
*filename,
*option;
const char
*format;
Image
*image;
ImageStack
image_stack[MaxImageStackDepth+1];
MagickBooleanType
fire,
pend,
respect_parenthesis;
MagickStatusType
status;
register ssize_t
i;
ssize_t
j,
k;
StreamInfo
*stream_info;
/*
Set defaults.
*/
assert(image_info != (ImageInfo *) NULL);
assert(image_info->signature == MagickSignature);
if (image_info->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(exception != (ExceptionInfo *) NULL);
(void) metadata;
if (argc == 2)
{
option=argv[1];
if ((LocaleCompare("version",option+1) == 0) ||
(LocaleCompare("-version",option+1) == 0))
{
ListMagickVersion(stdout);
return(MagickFalse);
}
}
if (argc < 3)
return(StreamUsage());
format="%w,%h,%m";
(void) format;
j=1;
k=0;
NewImageStack();
option=(char *) NULL;
pend=MagickFalse;
respect_parenthesis=MagickFalse;
stream_info=AcquireStreamInfo(image_info);
status=MagickTrue;
/*
Stream an image.
*/
ReadCommandlLine(argc,&argv);
status=ExpandFilenames(&argc,&argv);
if (status == MagickFalse)
ThrowStreamException(ResourceLimitError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
status=OpenStream(image_info,stream_info,argv[argc-1],exception);
if (status == MagickFalse)
{
DestroyStream();
return(MagickFalse);
}
for (i=1; i < (ssize_t) (argc-1); i++)
{
option=argv[i];
if (LocaleCompare(option,"(") == 0)
{
FireImageStack(MagickFalse,MagickTrue,pend);
if (k == MaxImageStackDepth)
ThrowStreamException(OptionError,"ParenthesisNestedTooDeeply",option);
PushImageStack();
continue;
}
if (LocaleCompare(option,")") == 0)
{
FireImageStack(MagickFalse,MagickTrue,MagickTrue);
if (k == 0)
ThrowStreamException(OptionError,"UnableToParseExpression",option);
PopImageStack();
continue;
}
if (IsCommandOption(option) == MagickFalse)
{
Image
*images;
/*
Stream input image.
*/
FireImageStack(MagickFalse,MagickFalse,pend);
filename=argv[i];
if ((LocaleCompare(filename,"--") == 0) && (i < (ssize_t) (argc-1)))
filename=argv[++i];
(void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
images=StreamImage(image_info,stream_info,exception);
status&=(images != (Image *) NULL) &&
(exception->severity < ErrorException);
if (images == (Image *) NULL)
continue;
AppendImageStack(images);
continue;
}
pend=image != (Image *) NULL ? MagickTrue : MagickFalse;
switch (*(option+1))
{
case 'a':
{
if (LocaleCompare("authenticate",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
break;
}
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'c':
{
if (LocaleCompare("cache",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("channel",option+1) == 0)
{
ssize_t
channel;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
channel=ParseChannelOption(argv[i]);
if (channel < 0)
ThrowStreamException(OptionError,"UnrecognizedChannelType",
argv[i]);
break;
}
if (LocaleCompare("colorspace",option+1) == 0)
{
ssize_t
colorspace;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
colorspace=ParseCommandOption(MagickColorspaceOptions,MagickFalse,
argv[i]);
if (colorspace < 0)
ThrowStreamException(OptionError,"UnrecognizedColorspace",
argv[i]);
break;
}
if (LocaleCompare("compress",option+1) == 0)
{
ssize_t
compress;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
compress=ParseCommandOption(MagickCompressOptions,MagickFalse,
argv[i]);
if (compress < 0)
ThrowStreamException(OptionError,"UnrecognizedImageCompression",
argv[i]);
break;
}
if (LocaleCompare("concurrent",option+1) == 0)
break;
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'd':
{
if (LocaleCompare("debug",option+1) == 0)
{
ssize_t
event;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
event=ParseCommandOption(MagickLogEventOptions,MagickFalse,argv[i]);
if (event < 0)
ThrowStreamException(OptionError,"UnrecognizedEventType",argv[i]);
(void) SetLogEventMask(argv[i]);
break;
}
if (LocaleCompare("define",option+1) == 0)
{
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
if (*option == '+')
{
const char
*define;
define=GetImageOption(image_info,argv[i]);
if (define == (const char *) NULL)
ThrowStreamException(OptionError,"NoSuchOption",argv[i]);
break;
}
break;
}
if (LocaleCompare("density",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("depth",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("duration",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'e':
{
if (LocaleCompare("extract",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'h':
{
if ((LocaleCompare("help",option+1) == 0) ||
(LocaleCompare("-help",option+1) == 0))
return(StreamUsage());
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'i':
{
if (LocaleCompare("identify",option+1) == 0)
break;
if (LocaleCompare("interlace",option+1) == 0)
{
ssize_t
interlace;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
interlace=ParseCommandOption(MagickInterlaceOptions,MagickFalse,
argv[i]);
if (interlace < 0)
ThrowStreamException(OptionError,"UnrecognizedInterlaceType",
argv[i]);
break;
}
if (LocaleCompare("interpolate",option+1) == 0)
{
ssize_t
interpolate;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
interpolate=ParseCommandOption(MagickInterpolateOptions,MagickFalse,
argv[i]);
if (interpolate < 0)
ThrowStreamException(OptionError,"UnrecognizedInterpolateMethod",
argv[i]);
break;
}
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'l':
{
if (LocaleCompare("limit",option+1) == 0)
{
char
*p;
double
value;
ssize_t
resource;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
resource=ParseCommandOption(MagickResourceOptions,MagickFalse,
argv[i]);
if (resource < 0)
ThrowStreamException(OptionError,"UnrecognizedResourceType",
argv[i]);
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
value=StringToDouble(argv[i],&p);
(void) value;
if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("list",option+1) == 0)
{
ssize_t
list;
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
list=ParseCommandOption(MagickListOptions,MagickFalse,argv[i]);
if (list < 0)
ThrowStreamException(OptionError,"UnrecognizedListType",argv[i]);
status=MogrifyImageInfo(image_info,(int) (i-j+1),(const char **)
argv+j,exception);
DestroyStream();
return(status != 0 ? MagickFalse : MagickTrue);
}
if (LocaleCompare("log",option+1) == 0)
{
if (*option == '+')
break;
i++;
if ((i == (ssize_t) argc) || (strchr(argv[i],'%') == (char *) NULL))
ThrowStreamException(OptionError,"MissingArgument",option);
break;
}
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'm':
{
if (LocaleCompare("map",option+1) == 0)
{
(void) CopyMagickString(argv[i]+1,"san",MaxTextExtent);
if (*option == '+')
break;
i++;
SetStreamInfoMap(stream_info,argv[i]);
break;
}
if (LocaleCompare("monitor",option+1) == 0)
break;
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'q':
{
if (LocaleCompare("quantize",option+1) == 0)
{
ssize_t
colorspace;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
colorspace=ParseCommandOption(MagickColorspaceOptions,
MagickFalse,argv[i]);
if (colorspace < 0)
ThrowStreamException(OptionError,"UnrecognizedColorspace",
argv[i]);
break;
}
if (LocaleCompare("quiet",option+1) == 0)
break;
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'r':
{
if (LocaleCompare("regard-warnings",option+1) == 0)
break;
if (LocaleNCompare("respect-parentheses",option+1,17) == 0)
{
respect_parenthesis=(*option == '-') ? MagickTrue : MagickFalse;
break;
}
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 's':
{
if (LocaleCompare("sampling-factor",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("seed",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("set",option+1) == 0)
{
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
break;
}
if (LocaleCompare("size",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) argc)
ThrowStreamException(OptionError,"MissingArgument",option);
if (IsGeometry(argv[i]) == MagickFalse)
ThrowStreamInvalidArgumentException(option,argv[i]);
break;
}
if (LocaleCompare("storage-type",option+1) == 0)
{
ssize_t
type;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
type=ParseCommandOption(MagickStorageOptions,MagickFalse,argv[i]);
if (type < 0)
ThrowStreamException(OptionError,"UnrecognizedStorageType",
argv[i]);
SetStreamInfoStorageType(stream_info,(StorageType) type);
break;
}
if (LocaleCompare("synchronize",option+1) == 0)
break;
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 't':
{
if (LocaleCompare("taint",option+1) == 0)
break;
if (LocaleCompare("transparent-color",option+1) == 0)
{
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
break;
}
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case 'v':
{
if (LocaleCompare("verbose",option+1) == 0)
break;
if ((LocaleCompare("version",option+1) == 0) ||
(LocaleCompare("-version",option+1) == 0))
{
ListMagickVersion(stdout);
break;
}
if (LocaleCompare("virtual-pixel",option+1) == 0)
{
ssize_t
method;
if (*option == '+')
break;
i++;
if (i == (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingArgument",option);
method=ParseCommandOption(MagickVirtualPixelOptions,MagickFalse,
argv[i]);
if (method < 0)
ThrowStreamException(OptionError,
"UnrecognizedVirtualPixelMethod",argv[i]);
break;
}
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
case '?':
break;
default:
ThrowStreamException(OptionError,"UnrecognizedOption",option)
}
fire=(GetCommandOptionFlags(MagickCommandOptions,MagickFalse,option) &
FireOptionFlag) == 0 ? MagickFalse : MagickTrue;
if (fire != MagickFalse)
FireImageStack(MagickFalse,MagickTrue,MagickTrue);
}
if (k != 0)
ThrowStreamException(OptionError,"UnbalancedParenthesis",argv[i]);
if (i-- != (ssize_t) (argc-1))
ThrowStreamException(OptionError,"MissingAnImageFilename",argv[i]);
if (image == (Image *) NULL)
ThrowStreamException(OptionError,"MissingAnImageFilename",argv[i]);
FinalizeImageSettings(image_info,image,MagickTrue);
if (image == (Image *) NULL)
ThrowStreamException(OptionError,"MissingAnImageFilename",argv[i]);
DestroyStream();
return(status != 0 ? MagickTrue : MagickFalse);
}

32
ImageMagick/wand/stream.h Normal file
View file

@ -0,0 +1,32 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand montage command-line method.
*/
#ifndef _MAGICKWAND_STREAM_H
#define _MAGICKWAND_STREAM_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport MagickBooleanType
StreamImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

372
ImageMagick/wand/studio.h Normal file
View file

@ -0,0 +1,372 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MagickWand private application programming interface declarations.
*/
#ifndef _MAGICKWAND_STUDIO_H
#define _MAGICKWAND_STUDIO_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#if defined(WIN32) || defined(WIN64)
# define MAGICKCORE_WINDOWS_SUPPORT
#else
# define MAGICKCORE_POSIX_SUPPORT
#endif
#define MAGICKWAND_IMPLEMENTATION 1
#if !defined(_MAGICKWAND_CONFIG_H)
# define _MAGICKWAND_CONFIG_H
# if !defined(vms) && !defined(macintosh)
# include "magick/magick-config.h"
# else
# include "magick-config.h"
# endif
#if defined(MAGICKCORE__FILE_OFFSET_BITS) && !defined(_FILE_OFFSET_BITS)
# define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
#endif
#if defined(_magickcore_const) && !defined(const)
# define const _magickcore_const
#endif
#if defined(_magickcore_inline) && !defined(inline)
# define inline _magickcore_inline
#endif
#if defined(_magickcore_restrict) && !defined(restrict)
# define restrict _magickcore_restrict
#endif
# if defined(__cplusplus) || defined(c_plusplus)
# undef inline
# endif
#endif
#if !defined(const)
# define STDC
#endif
#if defined(__cplusplus) || defined(c_plusplus)
# define storage_class c_class
#else
# define storage_class class
#endif
#include <stdarg.h>
#include <stdio.h>
#if defined(MAGICKCORE_HAVE_SYS_STAT_H)
# include <sys/stat.h>
#endif
#if defined(MAGICKCORE_STDC_HEADERS)
# include <stdlib.h>
# include <stddef.h>
#else
# if defined(MAGICKCORE_HAVE_STDLIB_H)
# include <stdlib.h>
# endif
#endif
#if defined(MAGICKCORE_HAVE_STRING_H)
# if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H)
# include <memory.h>
# endif
# include <string.h>
#endif
#if defined(MAGICKCORE_HAVE_STRINGS_H)
# include <strings.h>
#endif
#if defined(MAGICKCORE_HAVE_INTTYPES_H)
# include <inttypes.h>
#endif
#if defined(MAGICKCORE_HAVE_STDINT_H)
# include <stdint.h>
#endif
#if defined(MAGICKCORE_HAVE_UNISTD_H)
# include <unistd.h>
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
# include <direct.h>
# if !defined(MAGICKCORE_HAVE_STRERROR)
# define HAVE_STRERROR
# endif
#endif
#include <ctype.h>
#include <locale.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <signal.h>
#include <assert.h>
#if defined(MAGICKCORE_HAVE_XLOCALE_H)
# include <xlocale.h>
#endif
#if defined(MAGICKCORE_THREAD_SUPPORT)
# include <pthread.h>
#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
# define MAGICKCORE_HAVE_WINTHREADS 1
#include <windows.h>
#endif
#if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H)
# include <sys/syslimits.h>
#endif
#if defined(MAGICKCORE_HAVE_ARM_LIMITS_H)
# include <arm/limits.h>
#endif
#if defined(MAGICKCORE__OPENCL)
#if defined(MAGICKCORE_HAVE_CL_CL_H)
# include <CL/cl.h>
#endif
#if defined(MAGICKCORE_HAVE_OPENCL_CL_H)
# include <OpenCL/cl.h>
#endif
# define MAGICKCORE_OPENCL_SUPPORT 1
#endif
#if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
# include <omp.h>
# define MAGICKCORE_OPENMP_SUPPORT 1
#endif
#if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD
ssize_t pread(int,void *,size_t,off_t);
#endif
#if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE
ssize_t pwrite(int,const void *,size_t,off_t);
#endif
#if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY
extern size_t strlcpy(char *,const char *,size_t);
#endif
#if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF
extern int vsnprintf(char *,size_t,const char *,va_list);
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT)
# include <sys/types.h>
# include <sys/stat.h>
# if defined(MAGICKCORE_HAVE_FTIME)
# include <sys/timeb.h>
# endif
# if defined(MAGICKCORE_POSIX_SUPPORT)
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H)
# include <sys/ndir.h>
# endif
# if defined(MAGICKCORE_HAVE_SYS_DIR_H)
# include <sys/dir.h>
# endif
# if defined(MAGICKCORE_HAVE_NDIR_H)
# include <ndir.h>
# endif
# else
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
# endif
# include <sys/wait.h>
# include <pwd.h>
# endif
# if !defined(S_ISDIR)
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
# endif
# if !defined(S_ISREG)
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
# endif
# include "wand/MagickWand.h"
# if !defined(MAGICKCORE_WINDOWS_SUPPORT)
# include <sys/time.h>
# if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
# include <sys/times.h>
# endif
# if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
# include <sys/resource.h>
# endif
# if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
# include <sys/mman.h>
# endif
#endif
#else
# include <types.h>
# include <stat.h>
# if defined(macintosh)
# if !defined(DISABLE_SIOUX)
# include <SIOUX.h>
# include <console.h>
# endif
# include <unix.h>
# endif
#endif
#if defined(S_IRUSR) && defined(S_IWUSR)
# define S_MODE (S_IRUSR | S_IWUSR)
#elif defined (MAGICKCORE_WINDOWS_SUPPORT)
# define S_MODE (_S_IREAD | _S_IWRITE)
#else
# define S_MODE 0600
#endif
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
# include "magick/nt-base.h"
#endif
#if defined(macintosh)
# include "magick/mac.h"
#endif
#if defined(vms)
# include "magick/vms.h"
#endif
#include "wand/MagickWand.h"
#undef HAVE_CONFIG_H
#undef gamma
#undef index
#undef pipe
#undef y1
/*
Review these platform specific definitions.
*/
#if defined(MAGICKCORE_POSIX_SUPPORT) && !defined(__OS2__)
# define DirectorySeparator "/"
# define DirectoryListSeparator ':'
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
# define Exit exit
# define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse)
# define X11_PREFERENCES_PATH "~/."
# define ProcessPendingEvents(text)
# define ReadCommandlLine(argc,argv)
# define SetNotifyHandlers
#else
# if defined(vms)
# define X11_APPLICATION_PATH "decw$system_defaults:"
# define DirectorySeparator ""
# define DirectoryListSeparator ';'
# define EditorOptions ""
# define Exit exit
# define IsBasenameSeparator(c) \
(((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse)
# define MAGICKCORE_LIBRARY_PATH "sys$login:"
# define MAGICKCORE_SHARE_PATH "sys$login:"
# define X11_PREFERENCES_PATH "decw$user_defaults:"
# define ProcessPendingEvents(text)
# define ReadCommandlLine(argc,argv)
# define SetNotifyHandlers
# endif
# if defined(__OS2__)
# define DirectorySeparator "\\"
# define DirectoryListSeparator ';'
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
# define Exit exit
# define IsBasenameSeparator(c) \
(((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
# define PreferencesDefaults "~\."
# define ProcessPendingEvents(text)
# define ReadCommandlLine(argc,argv)
# define SetNotifyHandlers
#endif
# if defined(macintosh)
# define X11_APPLICATION_PATH "/usr/lib/X11/app-defaults/"
# define DirectorySeparator ":"
# define DirectoryListSeparator ';'
# define EditorOptions ""
# define IsBasenameSeparator(c) ((c) == ':' ? MagickTrue : MagickFalse)
# define MAGICKCORE_LIBRARY_PATH ""
# define MAGICKCORE_SHARE_PATH ""
# define X11_PREFERENCES_PATH "~/."
# if defined(DISABLE_SIOUX)
# define ReadCommandlLine(argc,argv)
# define SetNotifyHandlers \
SetFatalErrorHandler(MacFatalErrorHandler); \
SetErrorHandler(MACErrorHandler); \
SetWarningHandler(MACWarningHandler)
# else
# define ReadCommandlLine(argc,argv) argc=ccommand(argv); puts(MagickVersion);
# define SetNotifyHandlers \
SetErrorHandler(MACErrorHandler); \
SetWarningHandler(MACWarningHandler)
# endif
# endif
# if defined(MAGICKCORE_WINDOWS_SUPPORT)
# define DirectorySeparator "\\"
# define DirectoryListSeparator ';'
# define EditorOptions ""
# define IsBasenameSeparator(c) \
(((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
# define ProcessPendingEvents(text)
# if !defined(X11_PREFERENCES_PATH)
# define X11_PREFERENCES_PATH "~\\."
# endif
# define ReadCommandlLine(argc,argv)
# define SetNotifyHandlers \
SetErrorHandler(NTErrorHandler); \
SetWarningHandler(NTWarningHandler)
# undef sleep
# define sleep(seconds) Sleep(seconds*1000)
# if !defined(MAGICKCORE_HAVE_TIFFCONF_H)
# define HAVE_TIFFCONF_H
# endif
# endif
#endif
/*
Define system symbols if not already defined.
*/
#if !defined(STDIN_FILENO)
#define STDIN_FILENO 0x00
#endif
#if !defined(O_BINARY)
#define O_BINARY 0x00
#endif
#if !defined(PATH_MAX)
#define PATH_MAX 4096
#endif
/*
Exception defines.
*/
#define ThrowWandFatalException(severity,tag,context) \
{ \
ExceptionInfo \
*exception; \
\
exception=AcquireExceptionInfo(); \
(void) ThrowMagickException(exception,GetMagickModule(),severity,tag, \
"`%s'",context); \
CatchException(exception); \
exception=DestroyExceptionInfo(exception); \
}
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

1405
ImageMagick/wand/wand-view.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,73 @@
/*
Copyright 1999-2013 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 *,
const ssize_t,const int,void *),
(*GetWandViewMethod)(const WandView *,const ssize_t,const int,void *),
(*SetWandViewMethod)(WandView *,const ssize_t,const int,void *),
(*TransferWandViewMethod)(const WandView *,WandView *,const ssize_t,
const int,void *),
(*UpdateWandViewMethod)(WandView *,const ssize_t,const int,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 PixelWand
**GetWandViewPixels(const WandView *);
extern WandExport RectangleInfo
GetWandViewExtent(const WandView *);
extern WandExport void
SetWandViewDescription(WandView *,const char *),
SetWandViewThreads(WandView *,const size_t);
extern WandExport WandView
*CloneWandView(const WandView *),
*DestroyWandView(WandView *),
*NewWandView(MagickWand *),
*NewWandViewExtent(MagickWand *,const ssize_t,const ssize_t,const size_t,
const size_t);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif

154
ImageMagick/wand/wand.c Normal file
View file

@ -0,0 +1,154 @@
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% 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 %
% %
% %
% MagickWand Support Methods %
% %
% Software Design %
% John Cristy %
% May 2004 %
% %
% %
% Copyright 1999-2013 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. %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
*/
/*
Include declarations.
*/
#include "wand/studio.h"
#include "wand/MagickWand.h"
#include "wand/magick-wand-private.h"
#include "wand/wand.h"
static SplayTreeInfo
*wand_ids = (SplayTreeInfo *) NULL;
static MagickBooleanType
instantiate_wand = MagickFalse;
static SemaphoreInfo
*wand_semaphore = (SemaphoreInfo *) NULL;
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% A c q u i r e W a n d I d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% AcquireWandId() returns a unique wand id.
%
% The format of the AcquireWandId() method is:
%
% size_t AcquireWandId()
%
*/
WandExport size_t AcquireWandId(void)
{
static size_t
id = 0;
if (wand_semaphore == (SemaphoreInfo *) NULL)
AcquireSemaphoreInfo(&wand_semaphore);
LockSemaphoreInfo(wand_semaphore);
if ((wand_ids == (SplayTreeInfo *) NULL) && (instantiate_wand == MagickFalse))
{
wand_ids=NewSplayTree((int (*)(const void *,const void *)) NULL,
(void *(*)(void *)) NULL,(void *(*)(void *)) NULL);
instantiate_wand=MagickTrue;
}
id++;
(void) AddValueToSplayTree(wand_ids,(const void *) id,(const void *) id);
UnlockSemaphoreInfo(wand_semaphore);
return(id);
}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% D e s t r o y W a n d I d s %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DestroyWandIds() deallocates memory associated with the wand id's.
%
% The format of the DestroyWandIds() method is:
%
% void DestroyWandIds(void)
%
% A description of each parameter follows:
%
*/
WandExport void DestroyWandIds(void)
{
if (wand_semaphore == (SemaphoreInfo *) NULL)
AcquireSemaphoreInfo(&wand_semaphore);
LockSemaphoreInfo(wand_semaphore);
if (wand_ids != (SplayTreeInfo *) NULL)
wand_ids=DestroySplayTree(wand_ids);
instantiate_wand=MagickFalse;
UnlockSemaphoreInfo(wand_semaphore);
DestroySemaphoreInfo(&wand_semaphore);
}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% R e l i n q u i s h W a n d I d %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% RelinquishWandId() relinquishes a unique wand id.
%
% The format of the RelinquishWandId() method is:
%
% void RelinquishWandId(const size_t *id)
%
% A description of each parameter follows:
%
% o id: a unique wand id.
%
*/
WandExport void RelinquishWandId(const size_t id)
{
LockSemaphoreInfo(wand_semaphore);
if (wand_ids != (SplayTreeInfo *) NULL)
(void) DeleteNodeByValueFromSplayTree(wand_ids,(const void *) id);
UnlockSemaphoreInfo(wand_semaphore);
}

36
ImageMagick/wand/wand.h Normal file
View file

@ -0,0 +1,36 @@
/*
Copyright 1999-2013 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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
ImageMagick wand support methods.
*/
#ifndef _MAGICKWAND_WAND_H
#define _MAGICKWAND_WAND_H
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
extern WandExport size_t
AcquireWandId(void);
extern WandExport void
DestroyWandIds(void),
RelinquishWandId(const size_t);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif