pfsoutppm(1)

πŸ’– pfsoutppm, pfsouttiff, pfsoutrgbe, pfsoutexr πŸ’–

okay bestie, listen up β€” this is the pfstools girlie whose whole job is writing images or frames out in one of the several formats it knows about. yes, four commands, one manual page, one very slay family. 🫢


✨ SYNOPSIS ✨

pfsoutppm (<file> [--srgb] [--frames <range>])  [<file>...]
pfsouttiff (<file> [--srgb] [--frames <range>])  [<file>...]
pfsoutrgbe (<file> [--frames <range>])  [<file>...]
pfsoutexr (<file> [--frames <range>])  [<file>...]

🌸 DESCRIPTION 🌸

so basically? you pipe pfs frames into standard input, and this command writes them out in one of the several recognized formats. that's it, that's the vibe. πŸ’…

if you wanna know which formats are on the menu, go read the manual page of pfsinppm β€” the list lives over there, iykyk.

wanna write to standard output instead of a file? iconic, just use a single dash - in place of the filename. periodt.

every file name can have a %d pattern in it, and that gets swapped out for the frame numbers. the pattern follows the exact same syntax as the C printf command. so like, %04d gives you a frame number that's four digits wide with leading zeros β€” cute, right? and you pick which frames you want with the options below. ⚠️ heads up: the options must always be given after the file name. don't fight it, that's just the rules.

--frames <range>

give it a range in mathlab / octave format:

startframe:step:endframe

frame numbers start at startframe (default 0), go up by step (default 1), and stop at endframe. you can totally skip one of those values β€” like 1:100 gives you frames 1,2,...,100, and 0:2: gives you frame 0,2,4,... all the way up to the last file that exists. no cap. ✨

--srgb, -s

apply the sRGB non-linearity (approximately 2.2 gamma) before writing a file. this is your swap-in for using pfsgamma -g 2.2, and it's the move when you wanna store the result of some tone-mapping operators. it compresses contrast to make sure the tone values actually show up properly on a display. πŸ–₯️

🚨 only use this with linearized (not gamma corrected) images that are normalized to the 0-1 range. do not come for me if you ignore this.

--bit-depth <val>, -b <val>

enforce the bit-depth (per color channel). the allowed values run from 8 to 32. if you don't specify it, the bit depth from the pfs stream (the 'BITDEPTH' tag) gets used instead. and if the 'BITDEPTH' tag is missing? then the ImageMagick default value kicks in (usually 16). πŸ’€

also real talk: the bit depth of the file that actually gets stored may be lower than what you specified, if the file format just doesn't support higher bit depths. it's giving "we tried our best".


🌈 EXAMPLES 🌈

converting from one HDR format to another:

 pfsin memorial.tiff | pfsoutrgbe memorial.hdr

converting from one image format to another:

pfsin test.jpg | pfsout test.png

the same as above, but apply inverse gamma correction after reading an image (--linear) and then apply gamma correction before writing an image (--srgb):

 pfsin --linear test.jpg | pfsout --srgb test.png

πŸ‘‘ SEE ALSO πŸ‘‘


😭 BUGS 😭

writing TIFF files with pfsouttiff seems to be broken, but pfsoutimgmagick can be used instead. and pfsout will attempt to use pfsoutimgmagick and fall back to pfsouttiff if pfstools were not compiled with ImageMagick.

please report bugs and comments on implementation to the discussion group http://groups.google.com/group/pfstools β€” they're lovely, go say hi. 🫢


k that's the whole page bestie, from the General Commands Manual section of the pfstools collection, this being pfsoutppm(1). now go write some frames, main character. πŸ¦‹βœ¨πŸ’–