[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Someone doing some astronomical photography on the Gimp usenet newsgroup
was asking if there was an easy, batch-able way to crop a ton of photos
so thast only the 'interesting' part (in his case, the planet Mars, which
appaeared in different parts of the photos, as it moved across the sky).
I suggested "pnmcrop", which is one of the NetPBM console-based tools.
It lets you say "the part I don't care about is black... remove all black
Unfortunately, it appears you can't provide a threshold, and since his photos
wound up as JPEGs (or imagine if faint stars appeared here and there),
there were slight variations of "black" in the images, and therefore nothing
would get cropped out.
So, I whipped together a tiny NetPBM-library-based C program that tries
to crop out black, but allows you to specify a threshold. (In his case, "6"
was the magic number to get the black around Mars to go away.)
I've released it as GPL. You can also consider it a simple example of how to
program libnetpbm. (The man page kinda... sucks)
firstname.lastname@example.org Got kids? Get Tux Paint!
vox mailing list