ajslater / picopt

A multi format lossless image optimizer that uses external tools
GNU General Public License v3.0
108 stars 11 forks source link

Doesn't convert tiff, bmp, or pnm to png #6

Closed DarwinAwardWinner closed 6 years ago

DarwinAwardWinner commented 9 years ago

The documentation claims that various lossless formats will be converted to png, but this doesn't seem to be the case:

$ ls 0001*
0001.bmp  0001.pnm  0001.tiff

# Try picopt on each file
$ picopt 0001.tiff
0001.tiff: 0.00% (no bytes)
Evened out a total of no bytes or 0.00%
$ picopt 0001.bmp
Didn't optimize any files.
$ picopt 0001.pnm
Didn't optimize any files.

# No png file created
$ ls 0001*
0001.bmp  0001.pnm  0001.tiff
ajslater commented 9 years ago

PNM images were not being detected properly. PIL calls them "PPM". Fixed in version 1.1.2. TIFF images are detected properly, but optipng seems to barf on my test image, complaining its an invalid conversion format.