tjko / jpegoptim

jpegoptim - utility to optimize/compress JPEG files
http://www.iki.fi/tjko/projects.html
GNU General Public License v3.0
1.56k stars 116 forks source link

Unable to strip photos in HEIC format. #173

Closed huabin closed 3 months ago

huabin commented 3 months ago

Hello,

First thank you so much for creating this, I love it.

But there's an error, it seems unable to strip photos in HEIC format.

What did I do?

Run the command jpegoptim -s IMG_9230.HEIC

What did I get?

IMG_9230.HEIC  [ERROR]

What have I tried?

I tried several photos in HEIC format, all have this issue. And I tried to convert the photo's format to jpg. It works well.

Oldes commented 3 months ago

Unfortunately heic image format is not jpeg and so you should not expect, that jpegoptim will work with it. You will get the same error with any non jpeg input.. like:

>jpegoptim -s jpegoptim.exe
jpegoptim.exe  [ERROR]
tjko commented 3 months ago

HEIC seems to be Apple's variant of HEIF. I don't see jpegoptim supporting HEIC, unless support for it is added to existing JPEG libraries (which seems unlikely).

huabin commented 3 months ago

@tjko I noticed that. Maybe, I should change the title to hope to add support for HEIC