You are not logged in.

#1 2008-10-24 09:26:45

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

SOLVED Cannot view .pgm and .ppm images

Hi,

I tried to view some .pgm and .ppm images produced by my APT weather satellite image receiver but gqview could not open them. Tried mirage but have same problem. Only gimp opens these type of images.

Last time I tried to view .pgm images was probably more than 3 weeks ago so the problem may have developed after some recent -Syu. Any ideas please?

Looks like the pgm and ppm (at least) file formats spec has changed. I compared with a pgm file saved by gimp and there is a hash-prefixed comment line below the P5. I inserted one in the files produced by my app and now gqview (and others) open them OK. Example:

P5
#comment (anything)
800 600
255
data.........

works ok but:

P5
800 600
255
data.........

can only be opened by gimp.

But still there is another strange problem,  when I "open as text" an uncommented .pgm file in gvim, it seems to go into a long loop trying to open the file and has to be stopped with a user interrupt. With a commented file it has no problem!!??

Last edited by neok (2008-11-01 17:51:30)


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

Board footer

Powered by FluxBB