image_gimp_to_pil: discard invisible layers before merge

ironpython
András Veres-Szentkirályi 2013-11-09 20:24:55 +01:00
rodzic 3d68f7cc5b
commit b8ef35022b
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -158,6 +158,9 @@ def transmit_current_image(image, drawable, mode, vox, fskid):
def image_gimp_to_pil(image):
try:
sandbox = image.duplicate()
for layer in sandbox.layers:
if not layer.visible:
sandbox.remove_layer(layer)
sandbox.merge_visible_layers(CLIP_TO_IMAGE)
layer = sandbox.layers[0]
if not layer.is_rgb: