AffineTransformImage + interpolate
Posted: 2008-01-31T06:44:42-07:00
Hello,
I found that it is impossible to apply affine transform on image with interpolation (filter).
Following code runs forever.
Magick::Image *bitmap_;
MagickLib::Image *resized_;
MagickLib::AffineMatrix _affine;
_affine.sx = 0.1; _affine.rx = 0; _affine.tx = 0;
_affine.sy = 0.1; _affine.ry = 0; _affine.ty = 0;
bitmap_->image()->filter = MagickLib::BoxFilter;
bitmap_->image()->interpolate = MagickLib::FilterInterpolatePixel;
resized_ = MagickLib::AffineTransformImage( bitmap_->image(), &_affine, NULL);
Following code produces non-Bicubic interpolated result:
MagickLib::AffineMatrix _affine;
_affine.sx = 0.1; _affine.rx = 0; _affine.tx = 0;
_affine.sy = 0.1; _affine.ry = 0; _affine.ty = 0;
bitmap_->image()->interpolate = MagickLib::BicubicInterpolatePixel;
resized_ = MagickLib::AffineTransformImage( bitmap_->image(), &_affine, NULL);
How interpolation can be set for affine transform?
I found that it is impossible to apply affine transform on image with interpolation (filter).
Following code runs forever.
Magick::Image *bitmap_;
MagickLib::Image *resized_;
MagickLib::AffineMatrix _affine;
_affine.sx = 0.1; _affine.rx = 0; _affine.tx = 0;
_affine.sy = 0.1; _affine.ry = 0; _affine.ty = 0;
bitmap_->image()->filter = MagickLib::BoxFilter;
bitmap_->image()->interpolate = MagickLib::FilterInterpolatePixel;
resized_ = MagickLib::AffineTransformImage( bitmap_->image(), &_affine, NULL);
Following code produces non-Bicubic interpolated result:
MagickLib::AffineMatrix _affine;
_affine.sx = 0.1; _affine.rx = 0; _affine.tx = 0;
_affine.sy = 0.1; _affine.ry = 0; _affine.ty = 0;
bitmap_->image()->interpolate = MagickLib::BicubicInterpolatePixel;
resized_ = MagickLib::AffineTransformImage( bitmap_->image(), &_affine, NULL);
How interpolation can be set for affine transform?