mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
python: Remove layer offsets on ORA export
When exporting formats that use image procedures (like PNG), if we don't remove the layer offsets then the image is cut off on export. This is because we size the image to the layer size, but then the layer offsets move it off the canvas. This patch fixes the issue for ORA export.
This commit is contained in:
@@ -229,7 +229,7 @@ def export_ora(procedure, run_mode, image, file, options, metadata, config, data
|
||||
tmp_img.set_palette(image.get_palette())
|
||||
|
||||
tmp_layer = Gimp.Layer.new_from_drawable (drawable, tmp_img)
|
||||
tmp_layer.set_visible (False)
|
||||
tmp_layer.set_offsets (0, 0)
|
||||
tmp_img.insert_layer (tmp_layer, None, 0)
|
||||
|
||||
pdb_proc = Gimp.get_pdb().lookup_procedure('file-png-export')
|
||||
|
Reference in New Issue
Block a user