strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.76k stars 304 forks source link

heifhead as a pendant to jhead #573

Open hfst1 opened 2 years ago

hfst1 commented 2 years ago

One more wish: a program heifhead which works similar to jhead. I use jhead to code date in time in the filename like jhead -ft -n%Y%m%d_%H%M%S and want to do the same thing with HEIC-files. Thanks

hfst1 commented 2 years ago

I did it with this echo convert basename $fullheifname heifname=basename $fullheifname .HEIC jpgname=$heifname.jpg heif-convert $fullheifname /tmp/$tmp/$jpgname echo heif-convert executed jhead -ft -n%Y%m%d_%H%M%S /tmp/$tmp/$jpgname echo jhead executed

ls -alst /tmp/$tmp

            newheifname=`ls /tmp/$tmp/*.jpg`
            newheifname=`basename $newheifname .jpg`
            newheifname=$newheifname.HEIC
            mv $fullheifname `dirname $fullheifname`/$newheifname