pfsin(1)

πŸ’– pfsin(1) β€” bestie's guide to reading images into pfs stream πŸ’–

okay so this is pfsin, from the General Commands Manual section 1, and honestly? she's the girl who opens the door for everybody else. Let's get into it. πŸŽ€


✨ NAME ✨

pfsin β€” read an image in one of the several formats and write pfs stream to the standard output. iconic behavior honestly πŸ’…


✨ SYNOPSIS ✨

pfsin <file> [<file>...]

✨ DESCRIPTION ✨

okay so this command reads a high- or low-dynamic range image in any of several recognized formats and spits out a pfs stream on standard output. That stream usually gets piped straight into another program for further processing (peep the examples below, bestie πŸ‘€). To get the full list of recognized formats and extensions, just run:

pfsin --help

no cap, it will tell you everything.

Now here's the tea β˜• β€” this command is a front-end for the pfsin* programs that actually do the reading: pfsinrgbe, pfsinexr, etc. Based on the file extension, the appropriate program gets executed. And if you hand it two different file formats as parameters, it runs two different programs for loading images. Multi-tasking queen πŸ‘‘

Additional options starting with a dash - can be passed along to the pfsin* programs. Here are the rules for passing those options, and fr fr, read them carefully:

  • Options given before any image file name (or %d pattern) are passed to all pfsin* programs.
  • Options given after an image file name are only passed to the program executed for that file(s).
Also note, bestie: every option that takes an argument (except --frames) must be given in the form --option=value, that is, without a space between the option and its argument. The space? Not invited. πŸ™ˆ

✨ OPTIONS ✨

The following options are shared by most pfsin* commands, although some may not accept --absolute and may ignore --linear. Every friend group has a little drama, iykyk πŸ’€

  • --frames <range> β€” the range goes in mathlab / octave format:
startframe:step:endframe

Frame numbers start with startframe (default 0), get increased by step (default 1) and stop at endframe. You can skip one of those values, for example 1:100 for frames 1,2,...,100 and 0:2: for frames 0,2,4,... up to the last file that exists. slay, flexible ✨

  • --skip-missing β€” skip up to ten frames in a row if the corresponding files are missing. Otherwise the program stops reading the sequence at the first file that does not exist. This switch does not apply to the first frame in a sequence. This switch can be useful if there is a rendered animation where some of the frames have not been generated. we love a forgiving queen 🫢
  • --linear, -l β€” converts pixel values to linear luminance (XYZ), assuming the sRGB color space for the input image. The maximum pixel value (255,255,255) is mapped to Y=1. The LUMINANCE tag is set to RELATIVE.
  • --absolute <max_lum>, -a <max_lum> β€” --absolute converts pixel values to an absolute linear luminance (XYZ), that is, the color space in which channel Y contains luminance given in cd/m^2. The sRGB color space is assumed for the input image. The maximum pixel value (255,255,255) is mapped to Y=<max_lum>. <max_lum> is typically set to 80 [cd/m^2] for a CRT monitor. The LUMINANCE tag is set to ABSOLUTE. --absolute processes images almost the same as --relative, but additionally it scales all pixels by <max_lum>. math girlie behavior, we respect it πŸ’œ

✨ EXAMPLES ✨

bestie, these are the moments where it all comes together ✨

pfsin memorial.pic | pfsview

See a hdr image in Radiance format (RGBE). vibe check passed 🌸

pfsin memorial.pic | pfstmo_drago03 | pfsout memorial.jpeg

Tone map a hdr image and save it as JPEG. ate and left no crumbs πŸ‘‘


✨ SEE ALSO ✨

pfsout(1) pfsinppm(1)

go give them a read too, they're the rest of the friend group πŸ¦‹


✨ BUGS ✨

For LDR formats β€” JPEG, PNG, PNM: if pfstools are compiled without ImageMagic support, this command currently will not handle multiple frames given with a %d pattern. we don't love that for us but okay, noted 😭

Please report bugs and comments on implementation to the discussion group http://groups.google.com/group/pfstools. They're nice, promise 🫢


and that's the whole page, bestie!! This little beauty lives in the General Commands Manual as pfsin(1) β€” same name top and bottom, cute symmetry, we stan a consistent footer πŸ’– Now go pipe something into something else and make magic. periodt πŸ’…βœ¨πŸŒˆ