Page MenuHome

TRANSFORM / STABILIZE 2D: First row / column blackness.
Closed, ResolvedPublic

Description

I think this is a bug in imageprocess.c that is incorrectly testing values.

Currently, if you have an image that uses Bicubic filtering, the first row / column is always black. It shouldn't be.

Line 155 to 159 of imageprocess.c:

if (x1>0 && x1 < in->x) {
wx = P(n-a);
for(m= -1; m<= 2; m++){
y1= j+m;
if (y1>0 && y1<in->y) {

Should be:
if (x1>=0 && x1 < in->x) {
wx = P(n-a);
for(m= -1; m<= 2; m++){
y1= j+m;
if (y1>=0 && y1<in->y) {

I think the correct test is less than or equals.

This still results in a darkening of the first row or column (sampling blackness likely), but it isn't full black as the previous iteration was. Seems odd in that the full width or height column / row doesn't show signs of darkening which indicates that it isn't sampling the blackness beyond.

Details

Type
Bug

Event Timeline

Bug still stands, but I was mistaken on the width-1 and height-1 darkening, it is identical to the patched code row / columns.

Shall be fixed in svn rev44743. Thanks for the report, closing.

Sergey Sharybin (sergey) closed this task as Resolved.Mar 8 2012, 3:24 PM