Lumo wrote:
Onkel Hatti wrote:
It calls "gimp_layer_flatten"
Is this a guess, or did you check?
Why the doubt?
Lumo wrote:
Remove Alpha Channel works quickly and reliably with very large images. Flatten on the other hand takes a long time and frequently causes GIMP to crash with very large images.
Flattening an
image will definitely take longer than flattening a
layer. There is much more happening when flattening an image.
Flattening an image consists of initiating an UNDO group, producing a new temporary layer to store the result, producing another new temporary layer filled with the background color, merging the layers taking into account blend modes, opacities, visibilities, offsets, boundaries, and any layermasks (as well as copying parasites and tattoos), positioning the new layer in the layerstack, deleting all of the original layers as well as the background layer, flattening the new layer, and ending the UNDO group.
Even if the image comprises only a single layer, doing all of those steps will take longer than the single step of flattening the original layer, which is a simple pixel-by-pixel compositing against a single color and storing it back into the original layer (flattening a layer is one of the steps that needs to be done when flattening the image, anyway).