On Fri, 01 Oct 2010 18:34:52 +0200
[email protected] wrote:

| You probably have to analyse the PBM files by use of a hexeditor. The 
| PBM format seems to be rather simple and is described on several 
| websites. Furthermore, there seem to be ready-made analysation tools for it.
| 

The pbm (as well as pgm, ppm, pnm, pam) format is very simple.

If the header is binary, the file is gzipped
Otherwise the header will be plain text letters and numbers.
After the ascii header you then either have binary or ascii numbers.

That is it.

Any superfluous headers will be in the plain text ascii header.
For example programs add '#' comment lines before the final header
arguments, and in many cases that works.  Though not all programs
understand this.

For example

P4
# comment
# comment - next line is the proper header arguments
1 1
{binary here}

Just fire up a editor like  VIM in binary (-b) mode
and remove the comment headers and all should be well.



  Anthony Thyssen ( System Programmer )    <[email protected]>
 --------------------------------------------------------------------------
  What are the facts? Again and again and again  -- what are the _facts_?
  Shun wishful thinking, ignore divine revelation, forget what 'the stars
  foretell', avoid opinion, care not what the neighbors think, never mind
  the unguessable 'verdict of history', -- what are the facts, and to how
  many decimal places? You pilot always into an unknown future; facts are
  your only clue. Get the facts!  -- Lazuras Long, (Aka. Robert Heinlein)
 --------------------------------------------------------------------------
   Anthony's Castle     http://www.cit.griffith.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to