You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pixel sourcePix has coordinates (horizontalPos,verticalPos) and i, j can be either -1 or 1. Using that values there is computed offset used in getPixelInfo():
Function getPixelInfo() access pixel data stored row-wise.
When (for example) isAntialiased() takes sourcePix positioned on the end of a row then, with i=1 a sibling pixel is taken from the beginning of following image row which is not correct.
Similar problem will occur when sourcePix is placed on the row beginning, then siblings are taken from the end of previous row.
There may be also needed to add a check for negative offsets i.e. when sourcePix is positioned on the first image row (now there is only a check for too big offsets - in getPixelInfo()).
The text was updated successfully, but these errors were encountered:
I think you're right, and it is solvable by breaking out of the loop in isAntialiased(). Unfortunately the same check seems to affect performance, I had mixed results on testing. For that reason I'm not going to fix this issue, unless it's causing any problems?
In function
isAntialiased()
there are read pixels which are direct siblings ofsourcePix
:Pixel
sourcePix
has coordinates (horizontalPos
,verticalPos
) andi
,j
can be either -1 or 1. Using that values there is computedoffset
used ingetPixelInfo()
:Function
getPixelInfo()
access pixel data stored row-wise.When (for example)
isAntialiased()
takessourcePix
positioned on the end of a row then, withi=1
a sibling pixel is taken from the beginning of following image row which is not correct.Similar problem will occur when
sourcePix
is placed on the row beginning, then siblings are taken from the end of previous row.There may be also needed to add a check for negative offsets i.e. when
sourcePix
is positioned on the first image row (now there is only a check for too big offsets - ingetPixelInfo()
).The text was updated successfully, but these errors were encountered: