Carriage return on .PBM

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
anandiux
Posts: 1
Joined: 2015-05-22T11:48:54-07:00
Authentication code: 6789

Carriage return on .PBM

Post by anandiux »

Hello, Just recently started using ImageMagick and i'm enjoying it.
I need a text output with 0 and 1's of a monochromatic image (48x75).
I use the following command:
convert A.png -size 48x75 -negate -compress none A.pbm

I get the desired output, 0 and 1's separated by a space. However, there is a carriage return (13) inserted on the output file every 39 characters (or in my case every 39th 0's or 1's).
Ideally there would be a carriage return every 48th character, this way I can get a nice 48x75 matrix on excel (the size of my image), but instead I get a 39x93 matrix.
Is there a way to change this?

I can manipulate the file on notepad or word no problem, but i need to do this for 50 images..

Thanks for your help..
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Carriage return on .PBM

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.9.1-3 Beta, available by sometime tomorrow. Thanks.
Post Reply