QUOTE (PaulH51 @ Apr 14 2021, 03:21 PM)
![*](http://www.unmannedspaceflight.com/style_images/ip.boardpr/post_snapback.gif)
The black margins on the Mastcam-Z frames are a bit of a pain to remove manually. I do this to permit stitching in MS-ICE without leaving shadows at some of the the seams.
Does anyone here know how I could use GIMP to process a batch at one session?
Grateful for any advice
![smile.gif](http://www.unmannedspaceflight.com/style_emoticons/default/smile.gif)
Here ya go! Download
this batch-crop GIMP script, and save it here:
CODE
%appdata%\GIMP\2.10\scripts
This script operates
destructively on all images matching a filename pattern, saving the cropped images over the original image files.
To use this script, put all of the images you want to crop into a specific folder, then navigate in windows command prompt to that folder. Then call gimp from there, like so:
CODE
"c:\Program Files\GIMP 2\bin\gimp-2.10.exe" -i -b "(batch-crop \"*.png\" 1604 1196 25 4)" -b "(gimp-quit 0)"
In this case it will crop all png's in the current working directory to 1604 x 1196 (offset 25px from the left and 4px down) and save over the original files.
I hope it's useful! I'm also looking into content-aware filling the black schmutz in the Watson images - at least the larger spot, hopefully also the smaller ones if I can figure out how to load a schmutz map reference image.
Unrelated, I added an interesting feature to
roverpics. You can now hover over any thumbnail to see the metadata for that image. I also calculate local-level azimuth for each image and added that to the metadata. If you ever spot an interesting terrain feature and want to know which direction it is (relative to cardinal north) from the rover, this is a quick way to find out, just hover over the image and you'll find it toward the bottom.
Click to view attachmentThanks to Thomas Appéré for reporting a couple of glitches earlier this week. The page should now return all full-frame and thumbnail still frames and movie frames.
Cheers