gimp cannot read multi byte pgm files
Message-ID:<slrnhnecdl.j1u.unruh@wormhole.physics.ubc.ca>
Subject:
gimp cannot read multi-byte pgm files?
Date:Sun, 14 Feb 2010 00:11:49 +0100
I have some pgm files which have a max value of 4095 (ie 12 bits, which uses 2 bytes to store). But gimp complains that it cannot read a pgm file with more that 255 levels (8 bit) abnd that the pnm filter does not support it. (PNM image Message Invalid maximum value\Gimp message Opening '/tmp/dark.pgm' failed: PNM Image plug-in could not open image) The header of the file is P5 1920 1080 #Fri Feb 12 17:33:33 2010 4095 ...... (The dots are the start of the data) Since multibyte pgm are part of the standard, what is the problem? (http://netpbm.sourceforge.net/doc/pgm.html) Surely gimp is newer that 2000 when the 2 byte format apparently came in. Note that convert ( from ImageMagic) does seem to work, so if necessary I could always use convert to get it into some format gimp does understand. Thanks (gimp 2.4.7)
Message-ID:<hl8ida$2re$1@news.eternal-september.org>
Subject:
Re: gimp cannot read multi-byte pgm files?
Date:Sun, 14 Feb 2010 11:14:02 +0100
On Sat, 13 Feb 2010 23:11:49 +0000, unruh wrote: > I have some pgm files which have a max value of 4095 (ie 12 bits, which > uses 2 bytes to store). But gimp complains that it cannot read a pgm > file with more that 255 levels (8 bit) abnd that the pnm filter does not > support it. > (PNM image Message Invalid maximum value\Gimp message Opening > '/tmp/dark.pgm' failed: > PNM Image plug-in could not open image) > > The header of the file is > P5 > 1920 1080 > #Fri Feb 12 17:33:33 2010 > 4095 > ...... > (The dots are the start of the data) > > > > Since multibyte pgm are part of the standard, what is the problem? > (http://netpbm.sourceforge.net/doc/pgm.html) Surely gimp is newer that > 2000 when the 2 byte format apparently came in. > > Note that convert ( from ImageMagic) does seem to work, so if necessary > I could always use convert to get it into some format gimp does > understand. > > > > > > Thanks > > (gimp 2.4.7) Does 2.6.7 act the same way? Which OS? Is the file that you are working on available online? ciao, f -- aa #2301 "I'd take the awe of understanding over the awe of ignorance any day" --Douglas Adams
Message-ID:<slrnhnge55.6qf.unruh@wormhole.physics.ubc.ca>
Subject:
Re: gimp cannot read multi-byte pgm files?
Date:Sun, 14 Feb 2010 18:53:41 +0100
On 2010-02-14, furlan <magicus23REMOVE-THIS@gmail.com> wrote: > On Sat, 13 Feb 2010 23:11:49 +0000, unruh wrote: > >> I have some pgm files which have a max value of 4095 (ie 12 bits, which >> uses 2 bytes to store). But gimp complains that it cannot read a pgm >> file with more that 255 levels (8 bit) abnd that the pnm filter does not >> support it. >> (PNM image Message Invalid maximum value\Gimp message Opening >> '/tmp/dark.pgm' failed: >> PNM Image plug-in could not open image) >> >> The header of the file is >> P5 >> 1920 1080 >> #Fri Feb 12 17:33:33 2010 >> 4095 >> ...... >> (The dots are the start of the data) >> >> >> >> Since multibyte pgm are part of the standard, what is the problem? >> (http://netpbm.sourceforge.net/doc/pgm.html) Surely gimp is newer that >> 2000 when the 2 byte format apparently came in. >> >> Note that convert ( from ImageMagic) does seem to work, so if necessary >> I could always use convert to get it into some format gimp does >> understand. >> >> >> >> >> >> Thanks >> >> (gimp 2.4.7) > > Does 2.6.7 act the same way? Which OS? Yes. Mandriva Linux 2010.0 > > Is the file that you are working on available online? sure, ftp.theory.physics.ubc.ca/outgoing/dark.pgm It is 4MB. It is a dark photo by a camera I am testing, so do not expect to see anything. Here is another possibility ----------------------------------------------------- P5 2 2 4095 aabbccdd ------------------------ (no terminating carriage return at the end) which does not work with gimp but does with convert from imagemagic. While there appears to be some dispute with byte order, the netpgm seems to be pretty standard (most significant byte first).
Message-ID:<hlavtc$5if$1@news.eternal-september.org>
Subject:
Re: gimp cannot read multi-byte pgm files?
Date:Mon, 15 Feb 2010 09:16:44 +0100
On Sun, 14 Feb 2010 17:53:41 +0000, unruh wrote: > On 2010-02-14, furlan <magicus23REMOVE-THIS@gmail.com> wrote: >> On Sat, 13 Feb 2010 23:11:49 +0000, unruh wrote: >> >>> I have some pgm files which have a max value of 4095 (ie 12 bits, >>> which uses 2 bytes to store). But gimp complains that it cannot read a >>> pgm file with more that 255 levels (8 bit) abnd that the pnm filter >>> does not support it. >>> (PNM image Message Invalid maximum value\Gimp message Opening >>> '/tmp/dark.pgm' failed: >>> PNM Image plug-in could not open image) >>> >>> The header of the file is >>> P5 >>> 1920 1080 >>> #Fri Feb 12 17:33:33 2010 >>> 4095 >>> ...... >>> (The dots are the start of the data) >>> >>> >>> >>> Since multibyte pgm are part of the standard, what is the problem? >>> (http://netpbm.sourceforge.net/doc/pgm.html) Surely gimp is newer that >>> 2000 when the 2 byte format apparently came in. >>> >>> Note that convert ( from ImageMagic) does seem to work, so if >>> necessary I could always use convert to get it into some format gimp >>> does understand. >>> >>> >>> >>> >>> >>> Thanks >>> >>> (gimp 2.4.7) >> >> Does 2.6.7 act the same way? Which OS? > > Yes. Mandriva Linux 2010.0 > > > >> Is the file that you are working on available online? > > sure, > ftp.theory.physics.ubc.ca/outgoing/dark.pgm > > It is 4MB. > It is a dark photo by a camera I am testing, so do not expect to see > anything. > > Here is another possibility > > ----------------------------------------------------- P5 > 2 2 > 4095 > aabbccdd > ------------------------ > (no terminating carriage return at the end) > > which does not work with gimp but does with convert from imagemagic. > While there appears to be some dispute with byte order, the netpgm seems > to be pretty standard (most significant byte first). Hmmm, I can't seem to get it: Connecting to ftp.theory.physics.ubc.ca|142.103.234.23|:80... connected. HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9 Length: unspecified Saving to: `dark.pgm' 100%[======================================>] 21 --.-K/s in 0s 2010-02-15 03:13:20 (2.00 MB/s) - Read error at byte 21 (Connection reset by peer).Giving up. It did that repeatedly. I used wget. It looks like the workaround may be the way to go though. You would think that the GIMP would be able to read it though. ciao, f -- aa #2301 "I'd take the awe of understanding over the awe of ignorance any day" --Douglas Adams
Message-ID:<slrnhnjai2.q6u.unruh@wormhole.physics.ubc.ca>
Subject:
Re: gimp cannot read multi-byte pgm files?
Date:Mon, 15 Feb 2010 21:10:42 +0100
On 2010-02-15, furlan <magicus23REMOVE-THIS@gmail.com> wrote: > On Sun, 14 Feb 2010 17:53:41 +0000, unruh wrote: > >> On 2010-02-14, furlan <magicus23REMOVE-THIS@gmail.com> wrote: >>> On Sat, 13 Feb 2010 23:11:49 +0000, unruh wrote: >>> >>>> I have some pgm files which have a max value of 4095 (ie 12 bits, >>>> which uses 2 bytes to store). But gimp complains that it cannot read a >>>> pgm file with more that 255 levels (8 bit) abnd that the pnm filter >>>> does not support it. >>>> (PNM image Message Invalid maximum value\Gimp message Opening >>>> '/tmp/dark.pgm' failed: >>>> PNM Image plug-in could not open image) >>>> >>>> The header of the file is >>>> P5 >>>> 1920 1080 >>>> #Fri Feb 12 17:33:33 2010 >>>> 4095 >>>> ...... >>>> (The dots are the start of the data) >>>> >>>> >>>> >>>> Since multibyte pgm are part of the standard, what is the problem? >>>> (http://netpbm.sourceforge.net/doc/pgm.html) Surely gimp is newer that >>>> 2000 when the 2 byte format apparently came in. >>>> >>>> Note that convert ( from ImageMagic) does seem to work, so if >>>> necessary I could always use convert to get it into some format gimp >>>> does understand. >>>> >>>> >>>> >>>> >>>> >>>> Thanks >>>> >>>> (gimp 2.4.7) >>> >>> Does 2.6.7 act the same way? Which OS? >> >> Yes. Mandriva Linux 2010.0 >> >> >> >>> Is the file that you are working on available online? >> >> sure, >> ftp.theory.physics.ubc.ca/outgoing/dark.pgm >> >> It is 4MB. >> It is a dark photo by a camera I am testing, so do not expect to see >> anything. >> >> Here is another possibility >> >> ----------------------------------------------------- P5 >> 2 2 >> 4095 >> aabbccdd >> ------------------------ >> (no terminating carriage return at the end) >> >> which does not work with gimp but does with convert from imagemagic. >> While there appears to be some dispute with byte order, the netpgm seems >> to be pretty standard (most significant byte first). > > Hmmm, I can't seem to get it: > > Connecting to ftp.theory.physics.ubc.ca|142.103.234.23|:80... connected. > HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9 > Length: unspecified > Saving to: `dark.pgm' > > 100%[======================================>] 21 --.-K/s in 0s > > 2010-02-15 03:13:20 (2.00 MB/s) - Read error at byte 21 (Connection reset > by peer).Giving up. > It is an ftp file, not an html file I guess I should have written ftp://ftp.theory.physics.ubc.ca/outgoing/dark.pgm wget is trying to interpret it as an html file, which will fail miserably. For the small example above, if I convert it to a .png file with convert, and look at that in gimp, you see 4 pixels in various shades of grey. If you try it in gimp directly, it does not open at all-- invalid max value. > > It did that repeatedly. I used wget. It looks like the workaround may be > the way to go though. You would think that the GIMP would be able to > read it though. > > ciao, > f > > > >
Message-ID:<iPfen.40422$Ym4.9165@text.news.virginmedia.com>
Subject:
Re: gimp cannot read multi-byte pgm files?
Date:Mon, 15 Feb 2010 18:50:06 +0100
unruh wrote: > I have some pgm files which have a max value of 4095 (ie 12 bits, which > uses 2 bytes to store). But gimp complains that it cannot read a pgm > file with more that 255 levels (8 bit) abnd that the pnm filter does not > support it. > (PNM image Message Invalid maximum value\Gimp message > Opening '/tmp/dark.pgm' failed: > PNM Image plug-in could not open image) > > The header of the file is > P5 > 1920 1080 > #Fri Feb 12 17:33:33 2010 > 4095 > ...... > (The dots are the start of the data) > > > > Since multibyte pgm are part of the standard, what is the problem? > (http://netpbm.sourceforge.net/doc/pgm.html) > Surely gimp is newer that 2000 when the 2 byte format apparently came in. > > Note that convert ( from ImageMagic) does seem to work, so if necessary > I could always use convert to get it into some format gimp does > understand. Well I clicked on your link which downloaded and opened the file in KolourPaint. Saved it from there onto the desktop and right clicked open with gimp and it opened without complaint? Mandriva 2010, gimp 2.6.7 -- sid RLU 300284 2010



RSS News Feed