Open njdoyle opened 8 years ago
For piping from ImageMagick TGA works well.
TGA from ImageMagick is super slow to encode. On my newish MBP, a 1733x2376 JPEG (709K) input converts to BMP in 55ms but converts to TGA in 800ms.
Either way, I think the added BMP support in mozjpeg would be worth while and that TGA isn't necessarily the best option.
Oh, that's surprising. AFAIK TGA is as primitive as BMP, so I've been assuming it's essentially zero overhead.
For future me (or other people) finding this ticket: You have to pass "BMP3" to ImageMagick:
convert logo.png BMP3:- | cjpeg > out.jpg
Actually, I found that you also have to add the -compress none
option, like so:
convert logo.png -compress none BMP3:- | cjpeg > out.jpg
This is because sometimes imagemagick uses RLE for the output and mozjpeg
doesn't like that:
Sorry, compressed BMPs not yet supported
Mozjpeg supports BMP files as input but not recent versions of the BMP format. It currently supports up to BMP version 3. It would be useful to support versions more recent than that.
In particular, unless specified explicitly, current versions of ImageMagick will make BMPs of version 5.
The following command demonstrates mozjpeg's incompatibility: