[prev in list] [next in list] [prev in thread] [next in thread] 

List:       imagemagick-user
Subject:    Re: [magick-users] Breaking Image File into pieces using Endpoint
From:       Anthony Thyssen <A.Thyssen () griffith ! edu ! au>
Date:       2009-08-01 3:18:13
Message-ID: 20090801131813.1d403e76 () wraith
[Download RAW message or body]

On Fri, 31 Jul 2009 22:47:55 +0000
"Nick Csabi" <ncsabi@pchp.net> 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 )    <A.Thyssen@griffith.edu.au>
 -----------------------------------------------------------------------------
  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
Magick-users@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic