DGtal-team / DGtal

Digital Geometry Tools and Algorithm Library
https://dgtal.org
GNU Lesser General Public License v3.0
369 stars 113 forks source link

ascii PGM <-> binary PGM #51

Closed troussil closed 13 years ago

troussil commented 13 years ago

shapeGenerator outputs ascii PGM (P2): ./tools/shapeGenerator/shapeGenerator -s flower -R 25 -r 5 -k 4 -o flower4 whereas pgm2freeman requieres binary PGM (P5): ./tools/2dContourTools/pgm2freeman -i flower4.pgm gives the following error PNMReader : No P5 format in flower4.pgm terminate called after throwing an instance of 'DGtal::IOException' what(): DGtal IO error Abandon

Is it possible to only use ascii PGM (or binary PGM) or provides a tool for conversion ?

dcoeurjo commented 13 years ago

I confirm: -PNMReader: BINARY mode -PNMWriter: ASCII only

At this point, bertrand, could you just update the PGMReader you wrote to read ASCII PGM ?

Future work: add both ASCII/BIN in both reader/writer.