pfscut(1)
π pfscut(1) β it's giving "crop, but make it iconic" π
okay bestie, so this is pfscut from the General Commands Manual (section 1, the cool section), and it's literally the rectangle-extraction girlie of the PFS world. pull up a chair. π
β¨ NAME β¨
pfscut β extract a rectangle out of a frame in PFS stream π
π¦ SYNOPSIS π¦
pfscut [--left <columns>] [--right <columns>] [--top <rows>] [--bottom
<rows>] [--width <new_width>] [--height <new_height>] [--help] [x_ul
y_ul x_br y_br]
πΈ DESCRIPTION πΈ
so what this does is, it extracts a rectangle out of each frame in a PFS stream. every single one. no cap. π«Ά
and you've got two whole ways to tell it which rectangle you want, bestie:
- you can hand over the
xandycoordinates of the upper left corner and the lower right corner, or - you can give it a little combo of the options listed down below β¨
lowkey important detail: the coordinates start with 0 and they rise in the left-to-right direction and in the up-to-bottom direction. so 0 is where it begins, not 1. periodt. π
π OPTIONS π
--left <columns>,-l <columns>β how many columns you're cutting off the left edge of the image. bye bye, left columns π--right <columns>,-r <columns>β how many columns you're cutting off the right edge of the image. so long, right side π--top <rows>,-t <rows>β how many rows you're cutting off the top edge of the image. headless behaviour, but for crops β¨--bottom <rows>,-b <rows>β how many rows you're cutting off the bottom edge of the image. floor's gone, bestie π--width <new_width>,-W <new_width>β the width of the output image. and here's the tea:--widthcan be mixed with either--leftor--right. pick a side, not both π--height <new_height>,-H <new_height>β the height of the output image. same vibe:--heightcan be mixed with either--topor--bottom. one of them, bestie π--help,-hβ prints a list of the commandline options. your little cheat sheet π
π EXAMPLES π
okay these are the moments where it all comes together, iykyk:
pfsin image.hdr | pfscut --left 20 --top 5 | pfsout out.hdr
Cut out 20 columns from the left and 5 rows from the top edge of image.hdr, and save the frame as out.hdr. slay π₯
pfsin image.hdr | pfscut --left 20 --width 400 | pfsout out.hdr
Cut out 20 columns from the left edge of image.hdr, and create an output image 400 pixels in width. obsessed with the precision π
pfsin image.hdr | pfscut 0 0 511 511 | pfsout out.hdr
Cut the left-upper part of the image of the size 512x512. and here's the note they left us, bestie, read it carefully: coordinates start with 0 and 512 is the last row/column that is included in the resulting image. that's why the corner is 511, not 512. the way that math works ππ
β SEE ALSO β
go give them a read too, they're the supporting cast and they ate π
π BUGS π
found a bug or just have thoughts? please report bugs and comments to Dorota Zdrojewska <dzdrojewska@wi.ps.pl>. she's the main character of the bug tracker fr fr π«Ά
okay that's the whole page, bestie! this one came straight out of the General Commands Manual, section 1, and it's signed off as pfscut(1) β so you know exactly which icon wrote it. go forth and crop, and remember: coordinates start at 0. π§πβ¨
π¦ where this page comes from
- debian bookworm: pfstools 2.2.0-5+b1 Β· GPL-2.0-or-later
- debian trixie: pfstools 2.2.0-9 Β· GPL-2.0-or-later
- fedora 43: pfstools 2.2.0-23.fc43 Β· GPL-2.0-or-later
- fedora 44: pfstools 2.2.0-25.fc44 Β· GPL-2.0-or-later
- opensuse-leap 16.0: pfstools 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfstools 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfstools 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pfstools 2.2.0-bp160.1.20 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- ubuntu jammy: pfstools 2.2.0-2 Β· GPL-2.0-or-later
- ubuntu noble: pfstools 2.2.0-7build3 Β· GPL-2.0-or-later
- ubuntu questing: pfstools 2.2.0-9
- ubuntu resolute: pfstools 2.2.0-10 Β· GPL-2.0-or-later
- ubuntu stonking: pfstools 2.2.0-12 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms