On Fri, 31 Jul 2009 22:47:55 +0000
"Nick Csabi" <[email protected]> wrote:
| I wish I could send out the file, but I can't (sensitive). I can tell you
they are checks created by a system from TWS (twips) with an IMG file
extension.
|
| I'm just wondering if magick can be scripted with an offset or length and
using these offsets, split the file to single page tif.
|
You can use the UNIX utility 'dd' to read a section of a binary file
given the start point and length.
For example skip 4 bytes (start at 5th) and output the next 3 bytes...
echo '1234567890' | dd bs=1 skip=4 count=3 2>/dev/null; echo ''
567
The 2>/dev/null junks the dd report it outputs to STDERR
the final 'echo' is to add a extra return character to the end of the 3
bytes 'dd' extracts.
Anthony Thyssen ( System Programmer ) <[email protected]>
-----------------------------------------------------------------------------
Sendmail configuration files...
Experimental results of an explosion in a Punctuation Factory!!!
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users