http://bugzilla.gnome.org/show_bug.cgi?id=550569

includes gegl C code and pointers to image enlargement test code and results 
for a high quality (non linear) image resampling code (Yet Another Fast 
Resampler).

The first post contained slightly non-optimized code, the second, faster code 
with a bug. For this reason, use the code found in Comment #3.

Main features:

The new method is quite flexible: It has two parameters, like cubic splines, 
which I call "smooth" and "straighten" but which I think I may rename "smooth" 
and "antialias" (the first one primarily has to do with subpixel smoothing, the 
second, smoothing at a scale comparable to the distance between pixels. On the 
basis of limited testing on a processed digital photograph and a "text like" 
image, it appears that with the theoretically optimal values of the parameters 
(one of which has to be computed more precicely: complex integrals are involved 
in the exact computation) give excellent results. These approximate optimal 
values are smooth = .85 and straighten = 14.27; see the corresponding results 
for these values first.

When substituted for the gegl-sampler-cubic.c code, scale (run from xml) runs a 
smidgen faster than the stock gegl cubic, and 10-15% slower than stock gegl 
bilinear.

When smooth = 0 and straighten = 1, the method is co-convex (does not introduce 
kinks).

When smooth = 0 and straighten <= 2, the method is monotone (does not introduce 
halos). Monotonicity is a very good thing for the transparency channel.

Although these properties do not hold when smooth is not zero, for small values 
of smooth they may as well hold. Note however that my optimal (strongly 
nonlinear) values of smooth and straighten are quite far from the "no halo" 
values. Even then, the scheme does not smooth as much as Lanczos, but 
introduces much less halo, and has a much "crisper" look in general.

Comments, inquiries etc welcome.

Nicolas Robidoux 
Laurentian University/University Laurentienne.
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to