FHPythonUtils/GimpFormats

Feature: Support group and layer masks when flattening

Closed this issue ยท 5 comments

Feature

When flattening an XcfDocument with flattenAll it does not look the way it does when exported from GIMP. Masks seem to be ignored whether on a layer or on a group.

Describe the solution you'd like

flattenAll should result in the same image one would get if viewed in, or exported from, GIMP.

Group masks should be applied to all layers inside the group. A layer mask should be applied to its layer.

Can you provide an example xcf please and I'll take a look

This is the XCF I'm currently using to test various workarounds.

image
xcf_mask_test.zip

Just FYI, I've managed to work around it by applying layer and parent layer group masks to each layer, setting visible=False on all layer groups, and then calling flattenAll.

Hmm yeah that definitely sounds like a bug. I'll take a look over the next week ๐Ÿ™‚

Done in version 2021.1 :)