Convert ASCII-described file to binary format

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

Moderators: XnTriq, xnview

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

Convert ASCII-described file to binary format

Post by sartaros » Thu Dec 27, 2018 6:02 pm

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: 31372
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Convert ASCII-described file to binary format

Post by xnview » Thu Dec 27, 2018 8:03 pm

please try -ascii
Pierre.

sartaros
Posts: 25
Joined: Tue Dec 14, 2010 11:21 am

Re: Convert ASCII-described file to binary format

Post by sartaros » Fri Dec 28, 2018 11:30 am

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: 31372
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Convert ASCII-described file to binary format

Post by xnview » Fri Dec 28, 2018 2:09 pm

sorry, use -out pcx
Pierre.

sartaros
Posts: 25
Joined: Tue Dec 14, 2010 11:21 am

Re: Convert ASCII-described file to binary format

Post by sartaros » Sat Dec 29, 2018 4:17 pm

Thank you, Pierre

Post Reply