FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1477 : filter(DILATE/ERODE) - dilate(boolean) has bug in clamping of top kernel coordinate
Last modified: 2010-02-24 10:56
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
FIXED -
Pr
i
ority:
P4
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
davbol
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2010-02-23 11:40
As of 1.0.9.
This is a trivial, low-visibility/low-significance bug, but...
Within PImage.java dilate(boolean) there two occurences of code to clamp the l/r/t/b
kernel coords at image edges. The clamp for the top coordinate incorrectly assigns
pixel[0] for all columns, currently reads:
if (idxUp<0)
idxUp=0;
should be changed to read:
if (idxUp<0)
idxUp=currIdx;
as do the similar tests for l/r/b edges.
It's very subtle, but can be seen as a 5 pixel tall "gray band" across the top of this
example:
size(200,200);
background(loadImage("milan_rubbish.jpg"));
for (int i=0; i<5; i++)
filter(DILATE);
Additional Comment
#1 From fry 2010-02-24 10:56
thanks! just made the change in the two places in PImage, i'll assume we're
all set but let me know if there's a problem.