When making LoRAs, you may run into situations where you'll want to crop off the same part of every image in your dataset. The most common case is when using screencaps as data, as for some shows you'll either have a distorted edge, partial lines period TVs were expected to ignore, and/or baked in black bars to maintain aspect ratio. You might also want to unstretch some forced 16:9 images to their proper 4:3, or scale a lot of pixel art with next nearest. Those who own their PCs (instead of letting Redmond lease them to you) can easily fix these issues without adding any new programs*! (*may vary by distribution)
Figure out which, if any, version of ImageMagick you have by opening a terminal and running "convert -version" and "magick -version" (one of these will work, the other will do nothing). Popular distributions can have V6 or V7 by default (I do not recommend trying to manually upgrade or modify this if you have it preinstalled. At least make a Timeshift first if you try it.).
Make a folder with a copy of all your training data that needs to be cropped and nothing else.
Measure how much you wish to crop off each image (if applicable).
Open a terminal and navigate to the directory with the images you wish to modify (For the total novice: Copy the directory you wish to go to by clicking its path in windowed UI and copying it like any other text, then type "CD", followed by a quotation mark, pasting in the directory with middle mouse or right click option, then closing the quotation mark. i.e., "CD "[Directory]"" with the inner quotations. Then hit enter.).
Run commands.
The exact commands will vary by what exactly you wish to do. For V6 the following can help
"mogrify -shave [pixels to remove from left and right]x[pixels to remove from top and bottom] *.png" (this will remove the designated number of pixels from both left and right. Handy for returning pillarboxed images to true 4:3. Change png to your file type if needed. Note the number for either can be 0)
"mogrify -gravity [North/East/South/West] -chop [horizontal]x[vertical] *png" (removes the specified pixels from the north/east/south/west end. Occasionally useful if you don't want the symmetry of chop. Make sure to match horizontal or vertical with the correct gravity.)
"mogrify -scale [value]% *.png" (this will scale all images up using next nearest. I recommend using powers of two multiplied by 100% for cleanest results, e.g., 200, 400, 800, 1600 etc.)
"mogrify -resize [horizontal]x[vertical]! *.png" (this will resize images to that resolution, ignoring their aspect ratio. Use for unstreching 4:3 that have been stretched to 16:9, a fate that official YouTube uploads of old cartoons often suffer from. You have to figure out the proper resolution first on your own since, as far as I can tell, there's no way to just multiply the width by 75%.)
For V7 the commands are slightly different (the big one is that the program is invoked with "magick" instead of "mogrify") and you can read the docs because I'm not comfortable giving command lines instructions I can't readily test.
Edit: Why is this getting rated R? The image got rated PG, I set the article to PG, but it keeps showing as R.
Edit 2: Changed image. "Original" image (I cropped the bottom off the one used for the article) here. Let's see if that fixes it.