l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
August 5: Social gathering
Next Installfest:
TBD
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2003 Dec 14 03:02

The following is an archive of a post made to our 'vox mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox] pnmthreshcrop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox] pnmthreshcrop



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
border."

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)

  ftp://ftp.sonic.net/pub/users/nbs/unix/console/pnmthrescrop/

-- 
bill@newbreedsoftware.com                           Got kids?  Get Tux Paint! 
http://newbreedsoftware.com/bill/       http://newbreedsoftware.com/tuxpaint/

_______________________________________________
vox mailing list
vox@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.