>From 0e41e65f31ae07c91f2ed5dc8f0c51d05949be51 Mon Sep 17 00:00:00 2001
From: Jon Nordby <jono...@gmail.com>
Date: Sat, 27 Feb 2010 14:28:58 +0100
Subject: [PATCH] OpenRaster: optimize PNG saving

Sets lower compression and disables interlacing.
On a 5 layer image of 4500x6000px this gives an order of magnitude better
save-times, with 50% increase in file size.
---
plug-ins/pygimp/plug-ins/file-openraster.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plug-ins/pygimp/plug-ins/file-openraster.py
b/plug-ins/pygimp/plug-ins/file-openraster.py
index 2016c2b..eeefe13 100755
--- a/plug-ins/pygimp/plug-ins/file-openraster.py
+++ b/plug-ins/pygimp/plug-ins/file-openraster.py
@@ -85,7 +85,7 @@ def save_ora(img, drawable, filename, raw_filename):

def store_layer(img, drawable, path):
tmp = os.path.join(tempdir, 'tmp.png')
- pdb['file-png-save-defaults'](img, drawable, tmp, 'tmp.png')
+ pdb['file-png-save'](img, drawable, tmp, 'tmp.png', 0, 2, 1, 1, 1, 1, 1)
orafile.write(tmp, path)
os.remove(tmp)

-- 
1.7.0



-- 
Regards Jon Nordby - www.jonnor.com

Attachment: 0001-OpenRaster-optimize-PNG-saving.patch
Description: Binary data

_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to