Convert ASCII-described file to binary format

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
sartaros
Posts: 28
Joined: Tue Dec 14, 2010 11:21 am

Convert ASCII-described file to binary format

Post 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
User avatar
xnview
Author of XnView
Posts: 43444
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Convert ASCII-described file to binary format

Post by xnview »

please try -ascii
Pierre.
sartaros
Posts: 28
Joined: Tue Dec 14, 2010 11:21 am

Re: Convert ASCII-described file to binary format

Post by sartaros »

file foo.ppm
P6
3 2
1
000000000000000000

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

Alex
User avatar
xnview
Author of XnView
Posts: 43444
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Convert ASCII-described file to binary format

Post by xnview »

sorry, use -out pcx
Pierre.
sartaros
Posts: 28
Joined: Tue Dec 14, 2010 11:21 am

Re: Convert ASCII-described file to binary format

Post by sartaros »

Thank you, Pierre
Post Reply