[gimp] plug-ins: adapt file-openraster to API changes.



commit 6ec20e6ed0afc3304b6809671342b70e8b4b24f5
Author: Jacob Boerema <jgboerema gmail com>
Date:   Wed Apr 21 13:04:46 2021 -0400

    plug-ins: adapt file-openraster to API changes.
    
    I only fixed the changes that made it fail.
    I have not updated it to the sensitivity API.

 plug-ins/python/file-openraster.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/python/file-openraster.py b/plug-ins/python/file-openraster.py
index cd7343e35d..73239c5182 100755
--- a/plug-ins/python/file-openraster.py
+++ b/plug-ins/python/file-openraster.py
@@ -213,8 +213,8 @@ def save_ora(procedure, run_mode, image, n_drawables, drawables, file, args, dat
     xml_image = ET.Element('image')
     stack = ET.SubElement(xml_image, 'stack')
     a = xml_image.attrib
-    a['w'] = str(image.width())
-    a['h'] = str(image.height())
+    a['w'] = str(image.get_width())
+    a['h'] = str(image.get_height())
 
     def store_layer(image, drawable, path):
         tmp = os.path.join(tempdir, 'tmp.png')
@@ -292,7 +292,7 @@ def save_ora(procedure, run_mode, image, n_drawables, drawables, file, args, dat
         if lay is NESTED_STACK_END:
             parent_groups.pop()
             continue
-        _, x, y = lay.offsets()
+        _, x, y = lay.get_offsets()
         opac = lay.get_opacity () / 100.0 # needs to be between 0.0 and 1.0
 
         if not parent_groups:
@@ -322,7 +322,7 @@ def save_ora(procedure, run_mode, image, n_drawables, drawables, file, args, dat
     store_layer (thumb, thumb_layer, 'mergedimage.png')
 
     # save thumbnail
-    w, h = image.width(), image.height()
+    w, h = image.get_width(), image.get_height()
     if max (w, h) > 256:
         # should be at most 256x256, without changing aspect ratio
         if w > h:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]