FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Suggestions
   Software Suggestions
(Moderator: fry)
   Setting of interpolation mode
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Setting of interpolation mode  (Read 409 times)
Quasimondo

WWW Email
Setting of interpolation mode
« on: Mar 9th, 2004, 10:10pm »

I've made a few tests with the image() and replicate() methods and it looks like currently there is no interpolation used when the image is resized. So it would be great to have an additional command like setInterpolationMode() with the settings
REPEAT_PIXELS, LINEAR, BI_LINEAR, BI_CUBIC
 

Mario Klingemann | Quasimondo | Incubator | côdeazur
toxi_
Guest
Email
Re: Setting of interpolation mode
« Reply #1 on: Mar 10th, 2004, 1:06am »

at curent you can turn on bilinear filtering for an image by doing this:
 
BImage srcImg,destImg;
destImg.smooth=true;
destImg.replicate(srcImg,0,0,srcImg.width,srcImg.height,0,0,width,height );
 
if your target is the main pixelbuffer, you can also just use smooth() or noSmooth(). a final API is yet outstanding.
 
Quasimondo

WWW Email
Re: Setting of interpolation mode
« Reply #2 on: Mar 10th, 2004, 10:41am »

Thanks for the enlightment toxi! And I thought smooth() was only used for antialiasing.
 

Mario Klingemann | Quasimondo | Incubator | côdeazur
Pages: 1 

« Previous topic | Next topic »