Menu

#2197 bad PPM maxval

obsolete: 8.4.12
open
5
2007-01-11
2007-01-10
Anonymous
No

If maxval in PPM file header is greater than 255 then the
following will happen:

$ wish
% image create photo f -file x.ppm
PPM image file "x.ppm" has bad maximum intensity value 65535

and no image will be created.

Create x.ppm:
$ xwd -root | xwdtopnm >x.ppm
The maxval depends on the X servers display depth value.

Discussion

  • Donal K. Fellows

    • assigned_to: nobody --> dkf
     
  • Nobody/Anonymous

    Logged In: NO

    I (the submitter) forgot to provide my e-mail address: pme at prolan dot hu

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902
    Originator: NO

    What is the magic number for the file? (First line, should be a "P" followed by a number.) I ask because Tk currently only supports a small number of the PNM formats and only a small number of widths too. This can be changed, but I need to understand more to know how to change it. :-)