* Replace the blurry "High Quality EWA" technique with a 'Clamped EWA'
for Distort Resampling. This makes -distort a whole lot nicer
and allows for the use of better cylindrical filters.
+ * Bug fix for -filter point distorts (occasional generating black pixels)
2010-09-26 6.6.4-7 Anthony Thyssen <A.Thyssen@griffith...>
* Fix Point filter for ResizeImage() caused by support limiting the
#define EWA_CLAMP 1 /* EWA Clamping from Nicolas Robidoux */
/* output debugging information */
-#define DEBUG_NO_HIT_PIXELS 1 /* Make pixels that fail to 'hit' anything red */
#define DEBUG_ELLIPSE 0 /* output ellipse info for debug */
-#define DEBUG_HIT_MISS 0 /* output hit/miss pixels with above switch */
+#define DEBUG_HIT_MISS 0 /* output hit/miss pixels (as gnuplot commands) */
+#define DEBUG_NO_PIXEL_HIT 0 /* Make pixels that fail to hit anything - RED */
/*
Typedef declarations.
assert(resample_filter != (ResampleFilter *) NULL);
assert(resample_filter->signature == MagickSignature);
status=MagickTrue;
+
switch (method)
{
case AverageInterpolatePixel:
assert(resample_filter != (ResampleFilter *) NULL);
assert(resample_filter->signature == MagickSignature);
-#if DEBUG_ELLIPSE
- fprintf(stderr, "u0=%lf; v0=%lf;\n", u0, v0);
-#endif
-
status=MagickTrue;
GetMagickPixelPacket(resample_filter->image,pixel);
if ( resample_filter->do_interpolate ) {
return(status);
}
+#if DEBUG_ELLIPSE
+ fprintf(stderr, "u0=%lf; v0=%lf;\n", u0, v0);
+#endif
+
/*
Does resample area Miss the image?
And is that area a simple solid color - then return that color
assert(resample_filter->signature == MagickSignature);
resample_filter->limit_reached = MagickFalse;
- resample_filter->do_interpolate = MagickFalse;
/* A 'point' filter forces use of interpolation instead of area sampling */
if ( resample_filter->filter == PointFilter )
assert(resample_filter != (ResampleFilter *) NULL);
assert(resample_filter->signature == MagickSignature);
+ resample_filter->do_interpolate = MagickFalse;
resample_filter->filter = filter;
if ( filter == PointFilter )
}
if ( filter == UndefinedFilter )
- resample_filter->filter = LanczosFilter;
+ resample_filter->filter = MitchellFilter; /* a far less blurry filter */
resize_filter = AcquireResizeFilter(resample_filter->image,
resample_filter->filter,blur,MagickTrue,resample_filter->exception);