For transformations on images in some standard format, ImageMagick is often a good bet. If you are dealing with weird formats or arbitrary binary files, pipes are your friend...just filter the specific chunk of a byte stream you want to view and pipe that to od. You can do a one-liner (or maybe a few lines, depending on the verbosity your language of choice) in some scripting language to grab a "rectangular" section and output that to stdout. That way your "selection" logic is completely decoupled from od, so there's no need for extra features added to it.
Given base, span, stride, and count, the python for a rectangle of bytes would be something like: chain([bytes.__getslice__(*row) for row in [(start, start+span) for start in [base+offset for offset in [stride*row for row in range(count)]]]]) On Wed, Jul 28, 2010 at 5:42 PM, Robert Woodcock <r...@blarg.net> wrote: > On Wed, 2010-07-28 at 08:31 -0700, Mathew Watson wrote: >> Thanks Chris, >> >> Imagedb looks like a GUI app and library, where I need a console app run >> from the command line. I will keep the link around, as the program looks >> useful as a desktop app. > > Maybe run the image through imagemagick's convert utility with the crop > option? > -- > Robert Woodcock - r...@blarg.net > "Testing is the infinite process of comparing the invisible to the > ambiguous so as to avoid the unthinkable happening to the anonymous" > -- James Bach > >