09-06-2018, 10:11 AM (This post was last modified: 09-06-2018, 10:39 AM by Julio85.)
I´m trying to use that Python PlugIn and it doesn´t work, maybe I´m doing something wrong or introducing wrong parameters.
I need an example to make it work.
I´m using the last version GIMP 2.10.6
pdb.file_heif_save(image, drawable, uri, raw_uri, quality, lossless)
09-06-2018, 11:04 AM (This post was last modified: 09-06-2018, 11:20 AM by rich2005.)
AFAIK the plugin does not export, only open. I think there is a bug report about that. The progress report bottom of Gimp window show an export but no file is produced.
These 2 made with the heif linux encoder, lenna-100 is lossless lenna-50 is 50% quality setting
09-06-2018, 03:25 PM (This post was last modified: 09-06-2018, 03:26 PM by rich2005.)
I am wrong, Gimp does indeed save a .heif file, any old problems are fixed. (although not in my linux flatpak)
So what you need is one of the clever guys to advise on the syntax.
run-mode INT32 The run mode { RUN-NONINTERACTIVE (1)}
image IMAGE Input image
drawable DRAWABLE Drawable to export
filename STRING The name ofthefile to export the image in
raw-filename STRING The name of the file to export the image in
quality INT32 Quality factor (range: 0-100. 0 = worst. 100 = best)
lossless INT32 Use lossless compression (0 = lossy 1 = lossless)
I thought I might get this working in BIMP but it comes unstuck with the filename parameters.
With this finally I understood how to call this plugin, this is, not directly but via another script. For me it worked creating and registering my own script that used file-heif-save, after that it was just a matter of executing from bash, as shown in the link.
Using the great scripts developed by David M. MacMillan (thanks for sharing under GNU GPL), like dmmConvertPNGtoJPG, I changed bits and pieces so that script used file-heif-save instead of file-jpeg-save. Later it was a matter of placing it in GIMP scripts folder, refreshing GIMP's script-fu scripts, and calling the registered script from bash shell.
(script-fu-register
"convertJPGtoHEIF" ; script name to register
"<Toolbox>/Xtns/Script-Fu/conv/convertJPGtoHEIF" ; where it goes
"Convert JPG to HEIF" ; script description
"David M. MacMillan, modded by jmarcorb" ; author
"Copyright 2004 by David M. MacMillan; GNU GPL" ; copyright
"2018-09-08" ; date
"" ; type of image
SF-FILENAME "Infile" "infile.png" ; default parameters
SF-FILENAME "Outfile" "outfile.png"
)