pfsclamp(1)

πŸ’… pfsclamp(1) β€” General Commands Manual

okay bestie, gather round, because pfsclamp is about to become your new main character ✨ it lives in the General Commands Manual (section 1, obvi) and it does one thing and it does it gorgeously.


🌸 NAME 🌸

pfsclamp β€” clamp color and luminance channel values to be within the specified range πŸŽ€


✨ SYNOPSIS ✨

pfsclamp [--min <minimum>] [--max <maximum>] [--percentile] [--zero]
[--rgb]

πŸ¦‹ DESCRIPTION πŸ¦‹

so like. imagine a channel value that's just doing too much. it's above your max. it's below your min. it's giving chaos 😭 that's literally what this command is for.

Use this command to clamp values of luminance and color channels so they land within the specified range. Translation: if a value in the channel is above the specified maximum, or below the specified minimum, you set that value to either the minimum or the maximum. no in-between drama, no negotiating, it just gets snapped into range. periodt πŸ’…

Important vibe check: the command operates directly on XYZ channels. that's the tea. 🍡


πŸ‘‘ OPTIONS πŸ‘‘

  • --min <val> β€” the lower bound for clamping. Default value: 0.0001 (that's 10^-4, tiny but mighty 🧚)
  • --max <val> β€” the upper bound for clamping. Default value: 100000000 (that's 10^8, enormous, iconic πŸ‘‘)
  • --percentile, -p β€” treat the given min and max values as a percentile instead. lowkey a whole different mindset 🌈
  • --zero, -z β€” set values that are out of the clamping range to zero, instead of setting them to the specified maximum and minimum. bye felicia πŸ‘‹
  • --rgb β€” perform the clamping in RGB space instead 🎨

🌟 EXAMPLES 🌟

pfsin memorial.hdr | pfsclamp | pfsout memorial_cl.hdr

Remove possible out-of-range values β€” for examples zeros β€” from the memorial image. (yes, the original says "for examples zeros", we don't question the ancestors, we just vibe 🫢)

pfsin memorial.hdr | pfsclamp --max 0.95 -p | pfsout memorial_cl.hdr

Remove 5% of the brightest pixels from the original image. the brightest pixels really said "not today" πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

pfsin(1) pfsout(1)


πŸ™ˆ BUGS πŸ™ˆ

Please report bugs and comments to Rafal Mantiuk <mantiuk@mpi-sb.mpg.de> and Grzegorz Krawczyk <krawczyk@mpi-sb.mpg.de>.

fr fr if something's broken, tell them, don't just suffer in silence bestie πŸ’–

and that's the whole page!! this is pfsclamp(1) from the General Commands Manual β€” no date given on the original footer, just the humble pfsclamp(1) name chillin' at the bottom. slay, go clamp something πŸŒΈπŸ’…βœ¨