Sample Header Ad - 728x90

Imagemagick used to generate PPM's in Linux, PPM's are unreadable

5 votes
1 answer
17083 views
I need to generate PPM's as raw data sources for one program. I have a bunch of png's as Input, which I'm going to convert ppm's. When I try a tool like mogrify it generates files, but these are unreadable to any image viewer programs such as GIMP: mogrify -format ppm *.png I have installed netpbm package. I tried to open some other random PPM's from other places, any image viewer can open and read those files, the problem exists with my own generated files. The files created with mogrify seem to have the right size for their resolution and contains bits. In hex file viewer working file header looks like: > P6 640 480 25 Mine generated with Imagemagick: > P7 WIDTH 640 HEIGHT 480 DEPTH 3 MAXVAL 255 TUPLTYPE RGB ENDHD Probably I need to give Imagemagick some other parameters to make correct file format, but what? Or is there another tool which can easily convert png's to ppm's?
Asked by IBr (1775 rep)
May 29, 2013, 01:32 PM
Last activity: Nov 12, 2020, 11:43 PM