-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Original author: [email protected] (June 07, 2010 01:13:31)
This bug automatically added from:
http://dev.processing.org/bugs/show_bug.cgi?id=1195
Comment from -RoB-, 2009-03-10 16:22
As part of the cleaning up of the API for PImage in Revision 4720, the internal blit function
was hard-coded to use bilinear filtering with the following at line 1428:
boolean smooth = true; // may as well go with the smoothing these days
I would like to question the logic behind this change. While I understand the thinking behind
this comment, there are some occasions when using nearest neighbour to blit is desired, e.g.,
to achieve pixelation when zooming into an image.
Can the old behavior, using smooth() and noSmooth() to control the use of bilinear filtering,
be reinstated?
NOTE: This change to the blit function has made the documentation for copy() misleading, as
the image in the documentation clearly shows pixelation.
PImage img = loadImage("eames.jpg");
image(img, 0, 0);
copy(15, 25, 10, 10, 35, 25, 50, 50);
The example code is inaccurate in other ways (stroke color and rect position) but these are
perhaps less problematic than the representation of the effect of copying a small area to a
larger one.
Original issue: http://code.google.com/p/processing/issues/detail?id=165