pfsgamma(1)

πŸ’– pfsgamma(1) β€” the General Commands Manual glow-up πŸ’–

ok so bestie, welcome to pfsgamma, the little icon of the General Commands Manual section 1 lineup. she applies gamma correction to color or gray-scale images and she does it flawlessly, no cap. ✨


🌸 NAME 🌸

pfsgamma β€” Apply gamma correction to color or gray-scale images πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

pfsgamma [--gamma <gamma> | --inverse-gamma <inv-gamma>] [--mul
<multiplier>]

✨ DESCRIPTION ✨

okay so here's the tea πŸ“ β€” use this command to gamma correct a stream of pfs images. Gamma correction is literally equivalent to raising the value of the R, G and B channels (or Y for gray-scale images) to the 1/gamma power. that's it, that's the whole vibe. if you want more lore on gamma correction, it lives here:

http://www.poynton.com/notes/colour_and_gamma/GammaFAQ.html

This command can work on color images, and when it does, the XYZ channels get transformed to RGB space first, then they get gamma corrected, and then they get converted back to XYZ. πŸŽ€ For gray-scale images (only the Y channel, with XZ missing) gamma correction is applied only to the Y channel. she knows exactly which channel to touch, periodt.

Data can be multiplied by an optional multiplier before gamma correction. πŸ‘‘

⚠️ Note, and this one's important bestie: gamma correction will set the 'LUMINANCE' tag to 'DISPLAY', which cancels out any sRGB correction when you're saving to LDR files (like PPM, TIFF). 😭 It will also cause a warning message when saving to HDR files, because the intensities after gamma correction are not linearly related to luminance any more. so like, be aware.

πŸ’œ OPTIONS πŸ’œ

  • --gamma <gamma>, -g <gamma> β€” Perform gamma correction (input^(1/gamma)). This can be used to convert images from relative luminance or radiance to pixel values. Default value: 1.0 🌈
  • --inverse-gamma <inv-gamma>, -i <inv-gamma> β€” Perform inverse gamma correction (input^(gamma)). This can be used to convert images from pixel values to relative radiance or luminance. πŸ”₯
  • --mul <mul>, -m <mul> β€” Multiply data by this value before gamma correction. Default value: 1 πŸ’…

πŸŽ€ EXAMPLES πŸŽ€

pfsin memorial.hdr | pfsgamma -g 1.8 -m 10 | pfsout memorial_gc.ppm

Multiply memorial image by 10, gamma correct it and save to memorial_gc.ppm. ate. πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

pfsin(1) pfsout(1) pfsdisplayfunction(1)


πŸ’€ BUGS πŸ’€

Please report bugs and comments to the pfstools discussion group (http://groups.google.com/group/pfstools). fr fr, they wanna hear from you 🫢


ok that's the whole page, and if you made it this far β€” slay 🌈⭐ this was pfsgamma(1) straight outta the General Commands Manual, and that's the entire vibe, no cap πŸ’–βœ¨πŸŽ€πŸ¦‹