uclouvain / openjpeg

Official repository of the OpenJPEG project
Other
977 stars 457 forks source link

pnmtoimage can't read conformant pgm/pnm files. #440

Open gcode-importer opened 9 years ago

gcode-importer commented 9 years ago

Originally reported on Google Code with ID 440

pnmtoimage can't read conformant pgm/pnm files according to http://netpbm.sourceforge.net/doc/pgm.html
specification.

Issue 294 only partially solve the issue.

Reported by mayeut on 2014-11-22 14:22:14

gcode-importer commented 9 years ago
Could you please be a little more specific ? Thx

Reported by malaterre on 2015-01-07 16:41:52

gcode-importer commented 9 years ago
before r2942,

OpenJPEG failed to read data/baseline/conformance/a6_mono_colr_0.pgm

head -2 data/baseline/conformance/a6_mono_colr_0.pgm
P5
3323 891 255

Because it was expecting
P5
3323 891
255

The issue has been corrected for this specific PNM header disposition

A conforming header could be like :
P5 3323 891 255
Or
P5 3323
891 255
Or
...

In those cases, OpenJPEG would fail to read the file.

Reported by mayeut on 2015-01-07 17:12:49