pfsinimgmagick(1)

πŸ’– pfsinimgmagick β€” bestie's guide to loading pics with ImageMagick++ πŸ’–

okay so, this is the manual page for pfsinimgmagick, from the General Commands Manual section (that's section 1, if you're keeping score 🫢). Let's get into it, because this one is genuinely useful and I'm obsessed.


✨ NAME ✨

pfsinimgmagick β€” load images or frames using the ImageMagick++ library 🌸


🌈 SYNOPSIS 🌈

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

yes bestie, that's the whole thing, and yes, you read it right β€” those options go inside the parens after each <file>. iykyk πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

okay so first things first: this command can load images or frames in the multitude of image formats that the ImageMagick library supports. and when I say multitude, I mean it. that includes but is not limited to: BMP, JPG, PNG, GIF, EPS, TIFF, DPX. if you want the full list of available formats, go check the manual page of ImageMagick, because that's where the receipts live. πŸ”₯

pfsinimgmagick reads images or frames from files and writes a pfs stream to the Standard Output. and like, the pfs stream is usually piped to another program for further processing β€” that's just the vibe. πŸ’« if you want it to detect the format automatically based on the extension instead, use the pfsin command. different tool, different energy.

The output of pfsinimgmagick is scaled to the 0-1 range, unless the --absolute option is specified. By default, the LUMINANCE tag is set to DISPLAY contents. using the --linear switch you can force the inverse sRGB transformation to provide linear data β€” and in this case the LUMINANCE tag is set to RELATIVE contents. the --absolute switch can be used to convert pixels to absolute luminance values. slay, so many options. πŸ’…

this command handles the alpha channel (that's transparency, bestie) properly when it's stored in images. no notes. ✨

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. cute, right? πŸŽ€

You can select the frames using the following options β€” and the options must be always given after the file name, okay? don't fight me on this, that's just how it is:

  • --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 flexible, we love 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. basically it's the "it's fine, keep going" flag. πŸ’–
  • --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. 🌈
  • --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>. πŸ‘‘

πŸ¦‹ EXAMPLES πŸ¦‹

here's the moment you've been waiting for. iconic behaviour only:

pfsinimgmagick frame%04d.dpx --frames 0:10 | pfsview

Read frames from files frame0000.dpx, frame0001.dpx, ..., frame0010.dpx and show them using pfsview. 🎬✨ look at her go. pipe it straight into pfsview and you're living the dream.


πŸ’€ BUGS πŸ’€

okay, not everything is perfect, and we have to be honest:

pfsinimgmagick can not read frames from the Standard Input. 😭 that's just the truth of it, no cap.

Please report bugs and comments on implementation to the discussion group http://groups.google.com/group/pfstools β€” they want to hear from you, bestie. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

pfsin(1), pfsout(1) ImageMagick(1)


and that's the whole page, babes πŸŽ€ this was pfsinimgmagick(1) from the General Commands Manual, and if you made it to the bottom you have main character energy. go forth, load your frames, set your LUMINANCE tags, and remember: <max_lum> is typically 80 [cd/m^2] for a CRT monitor. periodt. πŸ’…βœ¨πŸ’–