Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the 3b-hdr Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 03:06:20 2022 GMT+0.
Next: Systems, Previous: The 3b-hdr Reference Manual, Up: The 3b-hdr Reference Manual [Contents][Index]
Read with (READ-HDR-FILE FILE-NAME &key FORMAT Y-UP)
or (READ-HDR-STREAM STREAM &key FORMAT Y-UP)
.
FILE-NAME
is a pathname designator for an HDR file.
STREAM
is an open (unsigned-byte 8)
input stream.
FORMAT
is either :RGB9-E5
(default) or :FLOAT
. If it is :FLOAT
, data will be returned as single-floats
, if :RGB9-E5
it will be returned as (unsigned-byte 32)
containing GL-style RGB9-E5
data.
Y-UP
specifies that data should be returned as GL-style lower-left origin (bottom row first), otherwise it is returned with upper-left origin (top-row first).
Both functions return an HDR-FILE
object with following accessors:
WIDTH
= width of image in pixels
HEIGHT
= height of image in rows
DATA
= vector of (UNSIGNED-BYTE 32)
with 1 element per pixel or SINGLE-FLOAT
with 3 elements per pixel, depending on requested FORMAT
when loading.
ORIGIN
= :UPPER-LEFT
or :LOWER-LEFT
depending on requested Y-UP
when loading.
GL-PIXEL-TYPE
, GL-PIXEL-FORMAT
, GL-INTERNAL-FORMAT
= values suitable to pass to cl-opengl when creating/uploading textures from data, :unsigned-int-5-9-9-9-rev :rgb :rgb9-e5
or :float :rgb :rgb32f
depending on FORMAT
EXPOSURE
= (product of) EXPOSURE
header value(s) in HDR file, or 1.0 if none specified. Usually 1.0.
Write with (WRITE-HDR-FILE FILE-NAME HDR &key UNCOMPRESSED IF-EXISTS IF-DOES-NOT-EXIST)
or (WRITE-HDR-STREAM STREAM HDR &key UNCOMPRESSED)
FILE-NAME
is a pathname designator for an HDR file to be written.
STREAM
is an open (unsigned-byte 8)
output stream.
HDR
is an HDR-FILE
object, with at least WIDTH
, HEIGHT
, DATA
, GL-PIXEL-TYPE
, and ORIGIN
specified.
If UNCOMPRESSED
is true, write scanlines as uncompressed RGBE instead of new-style RLE-compressed data.
IF-EXISTS
(default :error) and IF-DOES-NOT-EXIST
(default :create) are passed to CL:OPEN
Next: Files, Previous: Introduction, Up: The 3b-hdr Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
reader and writer for radiance HDR files
Bart Botta
MIT
Next: Packages, Previous: Systems, Up: The 3b-hdr Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: 3b-hdr/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
3b-hdr (system).
Next: 3b-hdr/hdr.lisp, Previous: 3b-hdr/3b-hdr.asd, Up: Lisp [Contents][Index]
3b-hdr (system).
Previous: 3b-hdr/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
3b-hdr (system).
Next: Definitions, Previous: Files, Up: The 3b-hdr Reference Manual [Contents][Index]
Packages are listed by definition order.
common-lisp.
Next: Indexes, Previous: Packages, Up: The 3b-hdr Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Generic functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Reads a radiance HDR image from FILE into a vector
of (UNSIGNED-BYTE 32) if FORMAT is :RGB9-E5, or SINGLE-FLOAT if format
is :FLOAT. If Y-UP is true, data is stored with bottom row of image
first, otherwise top row first.
Reads a radiance HDR image from STREAM into a vector
of (UNSIGNED-BYTE 32) if FORMAT is :RGB9-E5, or SINGLE-FLOAT if format
is :FLOAT. If Y-UP is true, data is stored with bottom row of image
first, otherwise top row first.
Write HDR to FILE, with ’new rle’ compression unless UNCOMPRESSED is true. HDR must have at least WIDTH, HEIGHT, GL-PIXEL-TYPE and DATA values specified. If GL-PIXEL-TYPE is :FLOAT, DATA should be a vector of R,G,B values. Otherwise, DATA is assumed to be a vector of RGB9-E5 values.
Write HDR to (UNSIGNED-BYTE 8) output stream STREAM, with ’new rle’ compression unless UNCOMPRESSED is true. HDR must have at least WIDTH, HEIGHT, GL-PIXEL-TYPE and DATA values specified. If GL-PIXEL-TYPE is :FLOAT, DATA should be a vector of R,G,B values. Otherwise, DATA is assumed to be a vector of RGB9-E5 values.
Next: Classes, Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Previous: Generic functions, Up: Public Interface [Contents][Index]
:width
:height
:headers
:upper-left
:origin
:pixel-type
:pixel-format
:internal-format
:exposure
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Generic functions, Previous: Macros, Up: Internals [Contents][Index]
Next: Classes, Previous: Ordinary functions, Up: Internals [Contents][Index]
Previous: Generic functions, Up: Internals [Contents][Index]
common-lisp.
:stream
This slot is read-only.
0
0
(make-array 8192 :element-type (quote (unsigned-byte 8)) :initial-element 0)
Previous: Definitions, Up: The 3b-hdr Reference Manual [Contents][Index]
Jump to: | (
B D E F G H I M N O R W |
---|
Jump to: | (
B D E F G H I M N O R W |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
B D E G H O P S W |
---|
Jump to: | *
B D E G H O P S W |
---|
Jump to: | 3
B C F H P S |
---|
Jump to: | 3
B C F H P S |
---|