Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bulk convert
#1
GIMP can convert formats, e.g., from HEIC to JPEG, and it can perform bulk operations from the command line using the -b switch, but I have found no listing of all possible CLI commands or of the specific command or syntax to convert the file format. How would I go about converting a directory's set of HEIC files to JPEG files from the CLI?
Reply
#2
For just a conversion, using Gimp is overkill. The CLI tool of choice for image conversions is ImageMagick. Can be as simple as:
Code:
magick convert image.heic image.jpg
There are of course plenty of options to fine-tune the conversion if necessary.

You can even do a while directory of images like this:
Code:
convert *.heic -set filename:base "%[basename]" "%[filename:base].jpg"

(some more ways here).
Reply
#3
My two euros worth

Using Windows and command line (CL) then ImageMagick (IM) is easiest. Note: on IM 7, use magick only not magick convert otherwise, you will get IM 6 behavior

Using Linux and CL then worth looking at the dedicated heif tools: https://stuffjasondoes.com/2019/07/10/ba...-in-linux/

Windows or linux and not commandline, a GUI utility. https://alessandrofrancesconi.it/projects/bimp/ Not as fast as CL but does take a folder of images and converts.
Reply
#4
Thanks for your replies!

@Ofnuts  I tried ImageMagick, but ver. 7 appears not to be available for Fedora, and ver. 6 does not have the magick command integrated into the app, nor could I find a plug-in for it. So yes, that seems the best option; but no, it didn't work. (And agreed that GIMP is overkill, but for whatever reason everyone else seems to be years behind in developing for heif.)

@rich2005  I try to avoid permitting a bundle of repos, mostly for security purposes, but I have libheif installed as a plug-in for GIMP (iirc). I'll try the technique on the stuffjasondoes.com page, and if it doesn't work I guess I'll install the repo and try again.
Reply
#5
Fedora is going to be a problem, those solutions are really debian based, although no reason why there should not be heic-enc / heic-convert as a rpm package (somewhere) for fedora

edit: might already be on your computer with libheif https://fedora.pkgs.org/34/rpmfusion-fre...4.rpm.html

Back to a Gimp based script, there is a heic-open/heic-save in the pdb. Ofnuts is the best to advise on that.

or BIMP for fedora https://www.reddit.com/r/Fedora/comments...ipulation/  (old post)
Reply
#6
(12-06-2021, 11:58 PM)Ofnuts Wrote: For just a conversion, using Gimp is overkill. The CLI tool of choice for image conversions is ImageMagick. Can be as simple as:
Code:
magick convert image.heic image.jpg
There are of course plenty of options to fine-tune the conversion if necessary.

You can even do a while directory of images like this:
Code:
convert *.heic -set filename:base "%[basename]" "%[filename:base].jpg"

(some more ways here).

(12-07-2021, 06:34 PM)Joseph_N Wrote: Thanks for your replies!

@Ofnuts  I tried ImageMagick, but ver. 7 appears not to be available for Fedora, and ver. 6 does not have the magick command integrated into the app, nor could I find a plug-in for it. So yes, that seems the best option; but no, it didn't work. (And agreed that GIMP is overkill, but for whatever reason everyone else seems to be years behind in developing for heif.)

@rich2005  I try to avoid permitting a bundle of repos, mostly for security purposes, but I have libheif installed as a plug-in for GIMP (iirc). I'll try the technique on the stuffjasondoes.com page, and if it doesn't work I guess I'll install the repo and try again.

In IM6 you just use convert. The added magick in ver 7 (because there are name clashes with other tools that have convert/identify commands)
Reply
#7
@Ofnuts
Does IM6 convert heic for you?  Using kubuntu 20.04 and from the repo it is not supported
I compile a static IM7 for my use with heic enabled.

Comparison:

   
Reply
#8
Hmm. Falling on my sword Smile I only tried JPG->HEIC and IM just made another JPG without telling me Smile

OTOH libheif is installed.
Reply


Forum Jump: