Added fxImages to STL.h.
return(constImage()->interlace);
}
+void Magick::Image::interpolate(const PixelInterpolateMethod interpolate_)
+{
+ modifyImage();
+ image()->interpolate=interpolate_;
+}
+
+Magick::PixelInterpolateMethod Magick::Image::interpolate(void) const
+{
+ return constImage()->interpolate;
+}
+
void Magick::Image::iptcProfile(const Magick::Blob &iptcProfile_)
{
modifyImage();
ThrowPPException;
}
-void Magick::Image::resize( const Geometry &geometry_ )
+void Magick::Image::resample(const Geometry &geometry_)
+{
+ MagickCore::Image
+ *newImage;
+
+ size_t
+ height=rows(),
+ width=columns();
+
+ ssize_t
+ x=0,
+ y=0;
+
+ // Calculate new size. This code should be supported using binary arguments
+ // in the ImageMagick library.
+ ParseMetaGeometry(static_cast<std::string>(geometry_).c_str(),&x,&y,&width,
+ &height);
+
+ GetPPException;
+ newImage=ResampleImage(constImage(),width,height,image()->filter,
+ &exceptionInfo);
+ replaceImage(newImage);
+ ThrowPPException;
+}
+
+void Magick::Image::resize(const Geometry &geometry_)
{
MagickCore::Image
*newImage;
void interlaceType(const InterlaceType interlace_);
InterlaceType interlaceType(void) const;
+ // Pixel color interpolation method to use
+ void interpolate(const PixelInterpolateMethod interpolate_);
+ PixelInterpolateMethod interpolate(void) const;
+
// IPTC profile (BLOB)
void iptcProfile(const Blob &iptcProfile_);
Blob iptcProfile(void) const;
void reduceNoise(void);
void reduceNoise(const double order_);
+ // Resize image in terms of its pixel size.
+ void resample(const Geometry &geometry_);
+
// Resize image to specified size.
void resize(const Geometry &geometry_);
using MagickCore::JPEGInterlace;
using MagickCore::PNGInterlace;
+ // Pixel interpolation methods
+ using MagickCore::PixelInterpolateMethod;
+ using MagickCore::UndefinedInterpolatePixel;
+ using MagickCore::AverageInterpolatePixel;
+ using MagickCore::Average9InterpolatePixel;
+ using MagickCore::Average16InterpolatePixel;
+ using MagickCore::BackgroundInterpolatePixel;
+ using MagickCore::BilinearInterpolatePixel;
+ using MagickCore::BlendInterpolatePixel;
+ using MagickCore::CatromInterpolatePixel;
+ using MagickCore::IntegerInterpolatePixel;
+ using MagickCore::MeshInterpolatePixel;
+ using MagickCore::NearestInterpolatePixel;
+ using MagickCore::SplineInterpolatePixel;
+
// Layer method
using MagickCore::LayerMethod;
using MagickCore::UndefinedLayer;
using MagickCore::RegistryWarning;
using MagickCore::RelinquishMagickMemory;
using MagickCore::RemapImage;
+ using MagickCore::ResampleImage;
using MagickCore::ResizeImage;
using MagickCore::ResizeMagickMemory;
using MagickCore::ResourceLimitError;
(void) MagickCore::DestroyExceptionInfo( &exceptionInfo );
}
+ // Applies a mathematical expression to a sequence of images.
+ template <class InputIterator>
+ void fxImages(Image *fxImage_,InputIterator first_,InputIterator last_,
+ const std::string expression)
+ {
+ MagickCore::ExceptionInfo
+ exceptionInfo;
+
+ MagickCore::Image
+ *image;
+
+ MagickCore::GetExceptionInfo(&exceptionInfo);
+ linkImages(first_,last_);
+ image=FxImageChannel(first_->constImage(),DefaultChannels,
+ expression.c_str(),&exceptionInfo);
+ unlinkImages(first_,last_);
+ fxImage_->replaceImage(image);
+ throwException(exceptionInfo);
+ (void) DestroyExceptionInfo(&exceptionInfo);
+ }
+
// Replace the colors of a sequence of images with the closest color
// from a reference image.
// Set dither_ to true to enable dithering. Set measureError_ to