png-scivis-19970127 Mon Jan 27 17:08:27 EST 1997 PNG-GROUP-DRAFT PNG Development Group PNG-Sci-Vis png-list@dworkin.wustl.edu 27 Jan 1997 PNG Scientific Visualization Chunks, Version 19970127 File: draft-png-scivis-19970127.txt Status of this Memo ************************************************************** DRAFT. This is document is written as though already approved, and is posted only for the edification of people who are voting on the pcal-19961230 proposal. Do not use this document for implementation purposes. It will be superseded tomorrow one way or the other. EXPIRES 28 Jan 1997. ************************************************************** This document is a specification by the PNG development group. Comments on this document can be sent to the PNG specification maintainers at png-info@uunet.uu.net or at png-list@dworkin.wustl.edu. Distribution of this memo is unlimited. At present, the latest version of this document is available on the World Wide Web from ftp://swrinde.nde.swri.edu/pub/png/documents/. PNG Development Group Informational [Page 1] PNG-GROUP PNG Sci-Vis Chunks 19970127 27 Jan 1997 Notices Copyright (c) 1997 Thomas Boutell Permission is granted to copy and distribute this document for any purpose and without charge, provided that the copyright notice and this notice are preserved, and that any substantive changes or deletions from the original are clearly marked. Abstract This document describes some special-purpose chunk types, of particular interest to the scientific visualization community, that have been registered for use in various PNG (Portable Network Graphics) and related multi-image applications. The chunks that have been registered to date are: "pCAL". Table of Contents 1. Introduction ................................................... 2 2. Summary of Proposed Sci-Vis Chunks ............................. 2 3. pCAL Calibration of pixel values .............................. 2 1. Introduction The chunks described here were registered by the PNG development group as public chunks for use by the scientific visualization community. The format of these chunks has been "frozen" and is not subject to change. No general-purpose decoder is required or expected to implement these chunks. Comments on these chunk specifications, and new proposals for additional chunk types, should be sent to the PNG specification maintainers at png- info@uunet.uu.net. or png-group@w3.org. The basic PNG specification is available from the PNG ftp archive at M) then there can be no lossless reversible mapping, but the functions provide the best integer approximations to floating-point affine transformations. For color_types 2, 3, and 6, the mapping algorithms are applied independently to each of the color sample values. In the case of color type 3 (indexed color), the mapping refers to the RGB samples and not to the index values. Linear data can be expressed with equation_type 1. Pure logarithmic data can be expressed either with X0 =: 0 X0 := 0 X1 =: M X1 := M Equation_type =: 1 Equation_type := 2 N =: 3 or with N := 3 P0 =: 0 P0 := 0 P1 =: min P1 := min P2 =: LOGe(max/min) P2 := max/min PNG Development Group Informational [Page 5] PNG-GROUP PNG Sci-Vis Chunks 19970127 27 Jan 1997 If present, the "pCAL" chunk must appear before the first "IDAT" chunk. Only one instance of the "pCAL" chunk is permitted in a PNG stream. Using equation type 3, floating point data in the range {-v0..v1} can be reduced (with loss) to a set of integer samples such that the resolution of the stored data is roughly proportional to its magnitude. For example, floating point data ranging from -10^31 to 10^31 (the usual range of floating point numbers on 32-bit machines) can be represented with X0 =: 0 X1 =: 65536 Equation_type =: 3 N =: 4 P0 =: 0.0 P1 =: 1.0e-30 P2 =: 280.0 P3 =: 32767.0 The resolution near zero is about 10^-33, while the resolution around +/-10^31 is about 10^28. Everywhere the resolution is about 0.4 percent of the magnitude. Implementations should use double precision arithmetic (or take other precautions) while performing the mappings for equation types 1, 2, and 3, to prevent overflow of intermediate results when the parameter "P1" is small and the exponential or power functions are large. Contributors Names of contributors not already listed in the PNG specification are presented in alphabetical order: * John Bowler, jbowler@acm.org * Todd French, tfrench@sandia.gov Editor * Glenn Randers-Pehrson, glennrp@arl.mil or randeg@alumni.rpi.edu End of PNG Scientific Visualization Chunks Specification. Expires 28 January 1997. PNG Development Group Informational [Page 6]