How to output grey-scale intensity map numbers ?
Alan Hewat from France  [4 posts]
9 years
This seems to me a silly question :-) but how can I most simply output grey-scale intensity map numbers of my image i.e. an array of integers 0-255 ? It would be nice to have such a format under the Save menu.
Anonymous 9 years

Try saving the image as a something.pgm The "pgm" format is a simple format that you can view in a text editor. The first couple of lines are just metadata (size, format) followed by a large array of binary 0-255 gray values. That is probably the closest you can get to your request.

Alan Hewat from France  [4 posts] 9 years
Many thanks STeven. Yes *.pgm (Portable Gray Map) format seems to be my best bet as described on http://netpbm.sourceforge.net/doc/pgm.html
The first 3 lines of my *.pgm image are:
720 576
which correspond to your description, since my image is 720x576 pixels of 8-bit (0-255) gray levels in binary, though the identifier for PGM is supposed to be P5 ? Actually for this image, the *.pgm file is the same as the *.ppm file and both have the PPM identifier P6 (RoboRealm
Anonymous 9 years

There was an error with the saving of pgm files. That should be a P5 at the top instead of a P6. What you were getting was a PPM instead. This has been fixed in the latest version.

Thanks for the note!

Hibou from France  [8 posts] 9 years
OK, many thanks for correcting that STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index