Aurimas wrote a patch that implements it the way that Raphael suggested.
Thanks a lot for that, the patch has been committed in the meantime.
While reviewing this patch it became evident that the BMP plug-in is one
of those evil fellows among the file plug-ins. It allocates a buffer the
full size of the image instead of transferring the pixel data to/from
the core tile-by-tile or at least in smaller stripes. It does this both
for loading and saving. If possible, this should be changed.
Gimp-developer mailing list