[Gegl-developer] transparent border when scaling etc

Eric Daoust e.daoust1986 at gmail.com
Thu Jul 16 18:26:59 PDT 2009


This concerns the "added transparent border" bug (feature?):

http://bugzilla.gnome.org/show_bug.cgi?id=549999

>From my observations, it seems the border removal may have to be done
through image crop after the completion of the image.  I will refer to
the gegl/operations/affine.c file's method get_bounding_box.  Our goal
was to hopefully feed both the larger bounding box AND the smaller box
that terminates at the borders of the image itself.  Unfortunately,
the larger bounding box is actually not directly fed to anything; it
is instead returned to the caller.  This method is an inheritance of a
parent class (99% sure) so changing the return type could be a real
pain in the neck.

The code which "adds the border" is this:

 in_rect.x      += context_rect.x;
 in_rect.y      += context_rect.y;
 in_rect.width  += context_rect.width;
 in_rect.height += context_rect.height;

Nicolas' idea was that a second bounding box would be "carried
around," one which has not been enlarged to accomodate the footprint
of the sampler as above.

Comments?

Eric


More information about the Gegl-developer mailing list