[gimp] plug-ins: OpenRaster, fix wrong layer positions
- From: Sven Neumann <neo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: OpenRaster, fix wrong layer positions
- Date: Thu, 6 May 2010 15:54:28 +0000 (UTC)
commit c16af0160677292e8fc8ba96bcd2361ee049c499
Author: Jon Nordby <jononor gmail com>
Date: Thu May 6 03:44:01 2010 +0200
plug-ins: OpenRaster, fix wrong layer positions
Don't store layer offsets in the PNG, or honor them on loading. The layer
position is given by the OpenRaster layer attributes alone. This caused a bug
where the offsets were applied twice, positioning the layer wrong.
plug-ins/pygimp/plug-ins/file-openraster.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/pygimp/plug-ins/file-openraster.py b/plug-ins/pygimp/plug-ins/file-openraster.py
index f4bf6e2..b41fc09 100755
--- a/plug-ins/pygimp/plug-ins/file-openraster.py
+++ b/plug-ins/pygimp/plug-ins/file-openraster.py
@@ -86,7 +86,7 @@ def save_ora(img, drawable, filename, raw_filename):
def store_layer(img, drawable, path):
tmp = os.path.join(tempdir, 'tmp.png')
interlace, compression = 0, 2
- png_chunks = (1, 1, 1, 1, 1) # write all PNG chunks
+ png_chunks = (1, 1, 0, 1, 1) # write all PNG chunks except oFFs(ets)
pdb['file-png-save'](img, drawable, tmp, 'tmp.png',
interlace, compression, *png_chunks)
orafile.write(tmp, path)
@@ -172,7 +172,7 @@ def load_ora(filename, raw_filename):
# import layer, set attributes and add to image
gimp_layer = pdb['gimp-file-load-layer'](img, tmp)
gimp_layer.name = name
- gimp_layer.translate(x, y) # move to correct position
+ gimp_layer.set_offsets(x, y) # move to correct position
gimp_layer.opacity = opac * 100 # a float between 0 and 100
img.add_layer(gimp_layer, layer_no)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]