Article View: comp.graphics.api.opengl
Article #114Re: OT: Looking for image file format that can handle 16b its per channel
From: Oliver Kreylos
Date: Thu, 30 Dec 1999 00:00
Date: Thu, 30 Dec 1999 00:00
36 lines
2170 bytes
2170 bytes
Paul Richards wrote: [snip] > ASCII PPM? What do you mean by that? The PPM's I currently can make > have the header in ASCII, and they do have a "maxValue" field but the > data is just raw binary. > > Could you explain a little further on how these ASCII ones work? Well, I can try... The header for an ASCII ppm is the code P3, followed by width, height and maxValue, as usual. Note that the values for those fields are given in ASCII - I mean, they are printed out. In a "raw" or binary ppm file, the code is a P6, and the image data is written as a series of bytes - three per pixel. In the ASCII format, each pixel is written as three integer values - all spelled out. Example: P3 2 2 1000 0 0 0 0 1000 0 1000 0 0 1000 1000 1000 The maxVal field can be arbitrarily large (well, let's say it *can* be 65535), so you can effectively store 16 bits per channel per pixel. HTH, Oliver -- Email: kreylos@cs.ucdavis.edu WWW: http://graphics.cs.ucdavis.edu/~okreylos
Technical Details
Message-ID:
<386BDD49.EDD94300@cs.ucdavis.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38693B3A.758C6CD5@dunvegan1.demon.co.uk> <84cb24$f2f$1@wagner.wagner.home> <386B576B.6C41C3D6@dunvegan1.demon.co.uk> <386BA020.705BACC8@cs.ucdavis.edu> <386BA45D.CC16CBA5@dunvegan1.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1036bc,ebc9e295d1a238b X-Google-Attributes: gid1036bc,public X-Google-Thread: 10c696,ebc9e295d1a238b X-Google-Attributes: gid10c696,public X-Google-Thread: 10d8ad,ebc9e295d1a238b X-Google-Attributes: gid10d8ad,public X-Google-Thread: 109fba,ebc9e295d1a238b X-Google-Attributes: gid109fba,public X-Google-Thread: f65bb,ebc9e295d1a238b X-Google-Attributes: gidf65bb,public From: Oliver Kreylos <kreylos@cs.ucdavis.edu> Subject: Re: OT: Looking for image file format that can handle 16b its per channel Date: 1999/12/30 Message-ID: <386BDD49.EDD94300@cs.ucdavis.edu> X-Deja-AN: 566663790 Content-Transfer-Encoding: 7bit References: <38693B3A.758C6CD5@dunvegan1.demon.co.uk> <84cb24$f2f$1@wagner.wagner.home> <386B576B.6C41C3D6@dunvegan1.demon.co.uk> <386BA020.705BACC8@cs.ucdavis.edu> <386BA45D.CC16CBA5@dunvegan1.demon.co.uk> Organization: University of California, Davis Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.graphics.api.opengl,comp.lang.c++,comp.os.linux.development.apps,demon.tech.pc,uk.comp.os.linux