pfsdisplayfunction(1)
π pfsdisplayfunction(1) β the glow-up page π
okay bestie, so this is the manual for pfsdisplayfunction, which lives in the General Commands Manual section, and honestly? it's giving "science but make it cute". it converts your pixels into actual real-world light units, or does the reverse. no cap. π¦
β¨ NAME β¨
pfsdisplayfunction β apply a display function to color or gray-scale images π
π SYNOPSIS π
pfsdisplayfunction [--display-function <df-spec>] [--to-pixels | --to-luminance] [--help] [--verbose]
πΈ DESCRIPTION πΈ
so like, use this command when you wanna convert pixel values into luminance / radiance units β the ones an actual monitor actually shows β or when you wanna do the whole conversion but backwards. inverse era. π
it's lowkey iconic in combination with the HDR-VDP, where you use it to turn LDR images into luminance maps that represent the image as shown on one particular display. the display function specification is identical to the one used in the pfstmo_mantiuk08 tone mapping operator (that's from the pfstmo package, iykyk). π
now here's the part where it's smart: if you don't specify --to-luminance or --to-pixels, it figures out which direction you want on its own, by reading the LUMINANCE tag in the pfs stream. main character energy fr fr. β¨
π OPTIONS π
--to-luminance,-lβ converts pixel values into absolute luminance / radiance units. for RGB images, the same display function gets applied in every single color channel. no favorites. π--to-pixels,-pβ converts absolute luminance / radiance units back into pixel values. and yep, for RGB images the same display function is applied in each color channel here too. π--display-function <df-spec>,-d <df-spec>β this is the display function, and it describes how a display's output luminance changes with pixel values. if you don't hand it a parameter, the command just assumes-df pd=lcd(peep Pre-defined display below for that one). there are several ways to specify it, and we're going through all of them: π«Ά
π Gamma-gain-black-ambient display model π
g=<float>:l=<float>:b=<float>:k=<float>:a=<float>[:n=<float>]
the gamma-gain-black-ambient model can approximate a whole range of displays and it's a compact way to specify a display function. it assumes the display function has this exact form:
L_d(I) = (l-b)*I^gamma + b + k/pi*a
and the parameters are as follows, bestie:
gβ gamma, aka the exponent of a display function (default2.2, usually from1.8to2.8)lβ peak luminance of a display incd/m^2(default100, from80for CRTs to500or more for newer displays)bβ black level, which is the luminance of a black pixel when the display is on (default1, usually from0.3to1 cd/m^2)kβ reflectivity of a screen (assuming that it is diffuse) (default0.01, usually about0.01(1%) for LCD displays, more for CRTs)aβ ambient illumination in lux. typical values are:50 luxβ Family living room (dim, default)400 luxβ A brightly lit office32000 luxβ Sunlight on an average day (min.)100000 luxβ Sunlight on an average day (max.)
π Pre-defined display π
pd=<display_type>
use a pre-defined display type. these options are for convenience only, and ngl they do not mean to accurately model the response of a particular display. the following display types are recognized:
lcd_office(g=2.2, l=100, b=0.8, k=0.01, a=400) β lcd set to "office" mode seen in bright environmentlcd(g=2.2, l=200, b=0.8, k=0.01, a=60) β typical lcd seen in dim environment (default)lcd_bright(g=2.6, l=500, b=0.5, k=0.01, a=10) β newer LCD TV seen in dark environmentcrt(g=2.2, l=80, b=1, k=0.02, a=60) β CRT monitor seen in dim environment
the parameters in the parenthesis are the same as for the gamma-gain-black-ambient model explained above. π
π¦ Lookup-table π¦
lut=<file>
this one is the most accurate specification of the display response function, but it requires measuring it with a luminance meter. it should also account for ambient light, so it's recommended that you use a luminance meter that can measure screen luminance from a distance, like the Minolta LS-100 β as opposed to those that use a rubber tube touching a display, which eliminates the influence of ambient light. π«£
the <file> must be a comma-separated text file in a format (CSV) with two columns: the first column represents pixel values (from 0.0 to 1.0) and the second is physical luminance in cd/m^2. both the pixel value and the luminance should increase in each raw. π
π₯ EXAMPLES π₯
pfsin barbara.jpg | pfsdisplayfunction -l -d pd:crt -v | pfsout barbara_crt.hdr
convert the barbara.jpg image from pixel values to a luminance map of the image shown on a CRT monitor, and store that map as an HDR image. she ate. π
β SEE ALSO β
pfsgamma(1) pfstmo_mantiuk08(1)
π BUGS π
please report bugs and comments to the pfstools discussion group (http://groups.google.com/group/pfstools). they wanna hear from you fr fr. π
π and that's the whole page, bestie. this was pfsdisplayfunction(1) from the General Commands Manual β go forth, convert those pixels, and slay. periodt. β¨ππ¦πΈ
mwah π β that's the pfsdisplayfunction(1) page from the General Commands Manual, so go convert some pixels and be iconic. πβ¨
π¦ where this page comes from
- debian bookworm: pfstools 2.2.0-5+b1 Β· GPL-2.0-or-later
- debian trixie: pfstools 2.2.0-9 Β· GPL-2.0-or-later
- fedora 43: pfstools 2.2.0-23.fc43 Β· GPL-2.0-or-later
- fedora 44: pfstools 2.2.0-25.fc44 Β· GPL-2.0-or-later
- opensuse-leap 16.0: pfstools 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfstools 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfstools 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfstools 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- ubuntu jammy: pfstools 2.2.0-2 Β· GPL-2.0-or-later
- ubuntu noble: pfstools 2.2.0-7build3 Β· GPL-2.0-or-later
- ubuntu questing: pfstools 2.2.0-9
- ubuntu resolute: pfstools 2.2.0-10 Β· GPL-2.0-or-later
- ubuntu stonking: pfstools 2.2.0-12 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms