mirror of https://github.com/GNOME/gimp.git
plug-ins: Optimize OpenRaster 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.
This commit is contained in:
parent
3352b0485c
commit
614714d980
|
@ -85,7 +85,10 @@ 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')
|
||||
interlace, compression = 0, 2
|
||||
png_chunks = (1, 1, 1, 1, 1) # write all PNG chunks
|
||||
pdb['file-png-save'](img, drawable, tmp, 'tmp.png',
|
||||
interlace, compression, *png_chunks)
|
||||
orafile.write(tmp, path)
|
||||
os.remove(tmp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue