pfsinppm(1)

πŸŽ€ NAME πŸŽ€

pfsinppm β€” Load images or frames in PBM formats. That's the whole job and she does it flawlessly, from the General Commands Manual. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

pfsinppm (<file> [--linear] [--absolute <max_lum>] [--frames <range>] [--skip-missing])  [<file>...]

🌸 DESCRIPTION 🌸

Okay so bestie, here's the tea: the pfsinppm command loads images in PBM formats (that's PPM, PNM or PGM) and writes a pfs stream to the standard output. That pfs stream is usually piped to another program for further processing, like a little relay race of data. πŸƒβ€β™€οΈ If you want the format detected automatically based on the extension, use pfsin instead β€” she's the flexible one. And for more information on PBM formats, refer to the NetPBM web page (http://netpbm.sourceforge.net/). No cap. πŸ’–

Now, real talk: PPM or PNM images are low dynamic range. So pixel values (0-255) are scaled to 0-1 before storing them in the pfs stream. And the same energy going the other way β€” before writing a low dynamic range image from the pfs stream, pixel values are multiplied by 255. By default, the 'LUMINANCE' tag is set to 'DISPLAY'. The --linear switch can force the inverse sRGB transformation and provide linear data, and in that case the 'LUMINANCE' tag is set to 'RELATIVE'. The --absolute switch can be used to convert pixels to absolute luminance values. Obsessed with her range, honestly. ✨

Wanna read images from standard input? Use a single dash '-' instead of a filename, and the images are read until EOF is reached. Iconic behavior. 🫢

Each file can contain a %d pattern, which is substituted with frame numbers. The pattern has the same syntax as the C printf command. For example, you can use %04d to make the frame number four digit with proceedings zeros. (Yes girl, "proceedings" β€” that's what the page says, we love her.) See the OPTIONS section below for details. πŸ‘‘


✨ OPTIONS ✨

  • --frames <range> β€” Range is given in mathlab / octave format:
startframe:step:endframe

Frame numbers start with startframe (default 0), are 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 frame 0,2,4,... up to the last file that exists. So bendy, so flexible, so cunty of her. 🌈

  • --skip-missing β€” Skip up to ten frames in a row if corresponding files are missing. Otherwise the program stops reading sequence at the first file that does not exists. 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 frame has not been generated. Perfect for those half-finished render eras, fr fr. 🧚
  • --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. LUMINANCE tag is set to RELATIVE. Math girl summer, we stan. πŸ”₯
  • --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. LUMINANCE tag is set to ABSOLUTE. --absolute process images almost the same as --relative, but additionally it scales all pixels by <max_lum>. She's doing the most and we respect it. πŸ‘‘

πŸ’– EXAMPLES πŸ’–

pfsinppm frame%04d.ppm --frames 0:10 | pfsview

Read frames from files frame0000.ppm, frame0001.ppm, ..., frame0010.ppm and show them using pfsview. Ate, no crumbs. πŸ’…

😭 BUGS 😭

Please report bugs and comments on implementation to the discussion group http://groups.google.com/group/pfstools. She's not perfect, she's just a girl. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

pfsin(1), pfsout(1) β€” go say hi to her friends, they're iconic too.


And that's the whole page, bestie β€” that's pfsinppm(1) from the General Commands Manual, hanging out at the bottom of the page like the main character she is. Mwah, go render something pretty. πŸ’œπŸŽ€βœ¨