How to convert a file from Base64 format to TIFFf format?
From: M_F_H (no_one_at_example.com)
Date: 09/24/04
- Next message: /dev/scott0: "Learning the console book"
- Previous message: Dave Uhring: "Re: Windows and UFS compatibility"
- Next in thread: Wiseguy: "Re: How to convert a file from Base64 format to TIFFf format?"
- Reply: Wiseguy: "Re: How to convert a file from Base64 format to TIFFf format?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Sep 2004 22:37:07 -0400
While trying to get Linux's "fax" command to work, I found the
contents of a fax in my mailbox that was sent me. Retrieving the fax
requires some kind translation from base64 to tiff. Here is what the
email looks like:
> From root@hts04.domain.tld Thu Sep 23 16:26:17 2004
> Return-Path: <root@hts04.domain.tld>
> Received: from hts04.domain.tld (code.fastclick.net [127.0.0.1])
> by hts04.domain.tld (8.12.11/8.12.11) with ESMTP id i8NKQHnw006199
> for <root@hts04.domain.tld>; Thu, 23 Sep 2004 16:26:17 -0400
> Received: (from root@localhost)
> by hts04.domain.tld (8.12.11/8.12.11/Submit) id i8NKQHSN006197
> for root; Thu, 23 Sep 2004 16:26:17 -0400
> Date: Thu, 23 Sep 2004 16:26:17 -0400
> From: root <root@hts04.domain.tld>
> Message-Id: <200409232026.i8NKQHSN006197@hts04.domain.tld>
> Subject: fax/message from " <sender's fax number>"
> Content-Type: multipart/mixed; boundary=EFAX_MAIL
> Status: RO
>
> --EFAX_MAIL
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> /usr/bin/efax: Thu Sep 23 16:23:42 2004 efax v 0.9 Copyright 1999 Ed Casas
> efax: 23:42 compiled Feb 16 2004 17:58:23
> efax: 23:42 argv[0]=/usr/bin/efax
> efax: 23:42 argv[1]=-v
> efax: 23:42 argv[2]=
> efax: 23:42 argv[3]=-v
> efax: 23:42 argv[4]=chewmainrxtf
> efax: 23:42 argv[5]=-d/dev/modem
> efax: 23:42 argv[6]=-iZ
> efax: 23:42 argv[7]=-i&FE&D2S7=120
> efax: 23:42 argv[8]=-i&C0
> efax: 23:42 argv[9]=-iM1L0
> efax: 23:42 argv[10]=-x
> efax: 23:42 argv[11]=/var/lock/LCK..modem
> efax: 23:42 argv[12]=-l
> efax: 23:42 argv[13]=+0 000 000 0000
> efax: 23:42 argv[14]=-kZ
> efax: 23:42 argv[15]=-g
> efax: 23:42 argv[16]=exec /sbin/getty -h modem %d vt100
> efax: 23:42 argv[17]=-e
> efax: 23:42 argv[18]=exec /usr/bin/fone %d
> efax: 23:42 argv[19]=-jS0=1
> efax: 23:42 argv[20]=-w
> efax: 23:42 argv[21]=-s
> efax: 23:42 argv[22]=-r
> efax: 23:42 argv[23]=%m%d%H%M%S
> efax: 23:42 read HDB pid 5046 [ 5046<LF>] from /var/lock/LCK..modem - stale
> efax: 23:42 removed stale lock /var/lock/LCK..modem from pid 5046
> efax: 23:42 created text lock file /var/lock/LCK..modem
> efax: 23:42 opened /dev/modem
> efax: 23:42 command "Q0V1"
> efax: 23:42 waiting 2.0 s
> efax: 23:42 .573 [<CR><LF>OK<CR><LF>]
> efax: 23:42 response "OK"
> efax: 23:42 command "Z"
> efax: 23:42 waiting 5.0 s
> efax: 23:42 .816 [<CR><LF>OK<CR><LF>]
> efax: 23:42 response "OK"
> efax: 23:42 command "&FE&D2S7=120"
> efax: 23:42 waiting 5.0 s
> efax: 23:42 .921 [AT&FE&D2S7=120<CR><CR><LF>]
> efax: 23:42 .943 [OK<CR><LF>]
> efax: 23:42 response "OK"
> efax: 23:43 command "&C0"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .053 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 command "M1L0"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .163 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 command "E0"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .271 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 command "I3"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .379 [<CR><LF>ACF3_V1.700-V90_P21_FSH<CR><LF>]
> efax: 23:43 .391 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 command "+FCLASS=?"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .506 [<CR><LF>0,1,1.0,2,8,10<CR><LF>]
> efax: 23:43 .515 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 command "+FCLASS=2"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .629 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 command "+FMFR?"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .741 [<CR><LF>CONEXANT <CR><LF>]
> efax: 23:43 .755 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 command "+FMDL?"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .867 [<CR><LF>V90 <CR><LF>]
> efax: 23:43 .880 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 using ACF3_V1.700-V90_P21_FSH CONEXANT V90 in class 2
> efax: 23:43 command "+FCR=1"
> efax: 23:43 waiting 5.0 s
> efax: 23:43 .993 [<CR><LF>OK<CR><LF>]
> efax: 23:43 response "OK"
> efax: 23:43 command "+FDIS?"
> efax: 23:43 waiting 5.0 s
> efax: 23:44 .004 [<CR><LF>0,5,0,2,0,0,0,0<CR><LF>]
> efax: 23:44 .013 [<CR><LF>OK<CR><LF>]
> efax: 23:44 response "OK"
> efax: 23:44 command "+FLID=" +0 000 000 0000""
> efax: 23:44 waiting 5.0 s
> efax: 23:44 .039 [<CR><LF>OK<CR><LF>]
> efax: 23:44 response "OK"
> efax: 23:44 command "S0=1"
> efax: 23:44 waiting 5.0 s
> efax: 23:44 .150 [<CR><LF>OK<CR><LF>]
> efax: 23:44 response "OK"
> efax: 23:44 read HDB pid 5453 [ 5453<LF>] from /var/lock/LCK..modem (our pid)
> efax: 23:44 removed lock file /var/lock/LCK..modem
> efax: 23:44 waiting for activity
> efax: 24:50 activity detected
> efax: 24:51 created text lock file /var/lock/LCK..modem
> efax: 24:51 waiting 120.0 s
> efax: 24:51 .232 [<CR><LF>RING<CR><LF>]
> efax: 24:51 waiting 120.0 s
> efax: 24:59 .206 [<CR><LF>+FCON<CR><LF>]
> efax: 25:00 .823 [<CR><LF>+FTSI: " <sender's fax number>"<CR><LF>]
> efax: 25:01 .132 [<CR><LF>+FDCS: 0,3,0,2,0,0,0,3<CR><LF>]
> efax: 25:01 .251 [<CR><LF>OK<CR><LF>]
> efax: 25:01 response "OK"
> efax: 25:01 fax call answered
> efax: 25:01 remote ID -> " <sender's fax number>"
> efax: 25:01 session 98lpi 9600bps 8.5"/215mm any 1D - - 10ms
> efax: 25:01 command "+FDR"
> efax: 25:01 waiting 60.0 s
> efax: 25:02 .800 [<CR><LF>+FCFR<CR><LF>]
> efax: 25:05 .447 [<CR><LF>+FDCS: 0,3,0,2,0,0,0,3<CR><LF>]
> efax: 25:05 .459 [<CR><LF>CONNECT<CR><LF>]
> efax: 25:05 response "CONNECT"
> efax: 25:05 session 98lpi 9600bps 8.5"/215mm any 1D - - 10ms
> efax: 25:21 received 1058 lines, 0 errors
> efax: 25:21 received -> 0923162501.001
> efax: 25:21 waiting 12.0 s
> efax: 25:21 .173 [<CR><LF>+FPTS: 1,1058,1058,0<CR><LF>]
> efax: 25:22 .461 [<CR><LF>+FET: 2<CR><LF>]
> efax: 25:22 .576 [<CR><LF>OK<CR><LF>]
> efax: 25:22 response "OK"
> efax: 25:22 wrote 0923162501.001 as 1728x1058 pixel 204x98 dpi TIFF page (12152 bytes)
> efax: 25:22 command "+FDR"
> efax: 25:22 waiting 60.0 s
> efax: 25:25 .334 [<CR><LF>+FHNG: 0<CR><LF>]
> efax: 25:26 .145 [<CR><LF>OK<CR><LF>]
> efax: 25:26 response "OK"
> efax: 25:26 wrote 0923162501.002 as 1728x0 pixel 204x98 dpi TIFF page (10 bytes)
> efax: 25:26 removed 0923162501.002
> efax: 25:26 read value 0 from " 0"
> efax: 25:26 command "Q0V1"
> efax: 25:26 waiting 2.0 s
> efax: 25:26 .255 [<CR><LF>OK<CR><LF>]
> efax: 25:26 response "OK"
> efax: 25:26 command "Z"
> efax: 25:26 waiting 5.0 s
> efax: 25:26 .498 [<CR><LF>OK<CR><LF>]
> efax: 25:26 response "OK"
> efax: 25:26 read HDB pid 5453 [ 5453<LF>] from /var/lock/LCK..modem (our pid)
> efax: 25:26 removed lock file /var/lock/LCK..modem
> efax: 25:26 done, returning 0 (success)
> --EFAX_MAIL
> Content-Type: image/tiff
> Content-Transfer-Encoding: base64
>
> SUkqAAgAAAARAAABBAABAAAAwAYAAAEBBAABAAAAIgQAAAIBAwABAAAAAQAAAAMBAwABAAAA
> AwAAAAYBAwABAAAAAAAAAAoBAwABAAAAAQAAABEBBAABAAAA6gAAABIBAwABAAAAAQAAABUB
> AwABAAAAAQAAABYBBAABAAAAIgQAABcBBAABAAAAeC8AABoBBQABAAAA2gAAABsBBQABAAAA
>
> <blah blah blah>
>
> 3x6d8LETVq1nCl4ALSU+nRGFnWoUDqfp17Tr++ErRdZ0Hqr474x0P68LRPDq26vHXj0747V8
> d8LXvjpx6q+FiOtePkIqJOiEI06XTgAtJT6dEYV1WPRwqJHCxU9VatZ8h/0hVDOr49aidYsQ
> qhVVLPYGjYLABaSnjrs6HRgyjHWIeT5Yi6LqpYhZbO2QpABaSnDNmkoALSW9pWACmzUAFNmo
> AKbNQAU2agAps1ABABABABABAAE=
> --EFAX_MAIL--
Any ideas?
- Next message: /dev/scott0: "Learning the console book"
- Previous message: Dave Uhring: "Re: Windows and UFS compatibility"
- Next in thread: Wiseguy: "Re: How to convert a file from Base64 format to TIFFf format?"
- Reply: Wiseguy: "Re: How to convert a file from Base64 format to TIFFf format?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|