On Sat, 2003-09-06 at 18:55, Tor Lillqvist wrote:
> Henrik Brix Andersen writes:
> > Using gimp_pixel_rgn_set_row() may work for some images, but since
> > GdkPixbufs internally have aligned data which may result in padding
> > garbage inserted between two rows, you will need to use
> > gdk_pixbuf_get_rowstride() and iterate over the rows one by one.
> But couldn't one at least check if gdk_pixbuf_get_rowstride()
> indicates that there isn't any padding, and in that case use
> gimp_pixel_rgn_set_rect()? At least on my aging PIII-450, the
> difference in speed is huge.
Well, I guess you could test if (rowstride / 3 == width) and call
_set_rect() instead of _set_row().
Henrik Brix Andersen <[EMAIL PROTECTED]>
Gimp-developer mailing list