Page 1 of 1

Convert ASCII-described file to binary format

Posted: Thu Dec 27, 2018 6:02 pm
by sartaros
Hi,
i have portable Greyscale file
P1
3 2
0 0 0
0 0 0
and i want to convert this to pcx.
>nconvert -o foo.pcx foo.pgm
but the result is pnm (portable pixmap) )file.

Is there some other way to convert ASCII-described file to binary format?

Thank you in advance

Alex

Re: Convert ASCII-described file to binary format

Posted: Thu Dec 27, 2018 8:03 pm
by xnview
please try -ascii

Re: Convert ASCII-described file to binary format

Posted: Fri Dec 28, 2018 11:30 am
by sartaros
file foo.ppm
P6
3 2
1
000000000000000000

>nconvert -o foo.pcx -ascii foo.ppm
converts .ppm to .pnm too

Alex

Re: Convert ASCII-described file to binary format

Posted: Fri Dec 28, 2018 2:09 pm
by xnview
sorry, use -out pcx

Re: Convert ASCII-described file to binary format

Posted: Sat Dec 29, 2018 4:17 pm
by sartaros
Thank you, Pierre