vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| corrlens typed (on Mon, Jun 07, 2004 at 05:59:02PM +0000): | Do you know of unix command that will convert a jpg file into base64binary | format ? | I have a base64 command here, can't reacll its provenance at the moment. But why do you need to do this? If it's to mail the JPEG, then mutt can do this, and scomail probably can too. -- JP |
| |||
| "Jean-Pierre Radley" <jpr@jpr.com> wrote in message news:20040607183420.GA10593@jpradley.jpr.com... > corrlens typed (on Mon, Jun 07, 2004 at 05:59:02PM +0000): > | Do you know of unix command that will convert a jpg file into base64binary > | format ? > | > > I have a base64 command here, can't reacll its provenance at the moment. > > But why do you need to do this? > If it's to mail the JPEG, then mutt can do this, and scomail probably can > too. > > -- I need to include a JPG file in a XML transmission. Here's the encoded sample image: <Images> <Image> <MaintenanceType>A</MaintenanceType> <Style>ZZ1</Style> <FileType>JPG</FileType> <FileSize>55</FileSize> <FileSizeUOM>KB</FileSizeUOM> <DPI>72</DPI> <ColorMode>RGB</ColorMode> <Background>WHI</Background> <OrientationView>FRO</OrientationView> <ImageFile>/9j/4AAQSkZJRgABAgEBLAEsAAD/7QGEUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAA BABLAAAAAEA AQEsAAAAAQABOEJJTQQNAAAAAAAEAAAAeDhCSU0D8wAAAAAACA AAAAAAAAAAOEJJTQQKAAAAAAAB AAA4QklNJxAAAAAAAAoAAQAAAAAAAAACOEJJTQP1AAAAAABIAC 9mZgABAGxmZgAGAAAAAAABAC9m ZgABAKGZmgAGAAAAAAABADIAAAABAFoAAAAGAAAAAAABADUAAA ABAC0AAAAGAAAAAAABOEJJTQP4 ....etc </ImageFile> </Image> </Images> <LifeCycleStatusCode>0</LifeCycleStatusCode> <ManufacturerCode>Str</ManufacturerCode> </Item> </Items> <Trailer> <ItemCount>1</ItemCount> <TransactionDate>1967-08-13</TransactionDate> </Trailer> </PartInformation> |
| |||
| corrlens wrote: > "Jean-Pierre Radley" <jpr@jpr.com> wrote in message > news:20040607183420.GA10593@jpradley.jpr.com... > >>corrlens typed (on Mon, Jun 07, 2004 at 05:59:02PM +0000): >>| Do you know of unix command that will convert a jpg file into #!/usr/bin/perl use MIME: $encoder = new MIME: $encoder->encode(\*STDIN, \*STDOUT); |
| |||
| corrlens wrote: > Do you know of unix command that will convert a jpg file into > base64binary format ? > > Thanks http://www.aljex.com/bkw/sco/index.html#base64 -- Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/ +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani |
| |||
| "Brian K. White" <brian@aljex.com> wrote in message news:6Omdnc76apH_kVjdRVn-tw@comcast.com... > corrlens wrote: > > Do you know of unix command that will convert a jpg file into > > base64binary format ? > > > > Thanks > > http://www.aljex.com/bkw/sco/index.html#base64 > > Great!! Thank you very much!! |
| |||
| "mfml03" <mfml03SPAMSUX@dsl.pipex.com> wrote in message news:40c4c94d$0$22831$cc9e4d1f@news.dial.pipex.com ... > corrlens wrote: > > "Jean-Pierre Radley" <jpr@jpr.com> wrote in message > > news:20040607183420.GA10593@jpradley.jpr.com... > > > >>corrlens typed (on Mon, Jun 07, 2004 at 05:59:02PM +0000): > >>| Do you know of unix command that will convert a jpg file into > > #!/usr/bin/perl > use MIME: > $encoder = new MIME: > $encoder->encode(\*STDIN, \*STDOUT); When I ran it , it complained about the command *Decoder*, maybe my perl doesn't have all the libraries.. I'll try this after upgrading my perl.. Thanks |
| |||
| "Brian K. White" <brian@aljex.com> wrote in message news:6Omdnc76apH_kVjdRVn-tw@comcast.com... > corrlens wrote: > > Do you know of unix command that will convert a jpg file into > > base64binary format ? > > > > Thanks > > http://www.aljex.com/bkw/sco/index.html#base64 > Just for the record, To reverse this process is it done with uudecode ? Thanks |
| |||
| corrlens wrote: > "Brian K. White" <brian@aljex.com> wrote in message > news:6Omdnc76apH_kVjdRVn-tw@comcast.com... >> corrlens wrote: >>> Do you know of unix command that will convert a jpg file into >>> base64binary format ? >>> >>> Thanks >> >> http://www.aljex.com/bkw/sco/index.html#base64 >> > > Just for the record, To reverse this process is it done with uudecode > ? > > > Thanks base64 -d there isn't a man-page, but.... ----snip---- # base64 -h base64: ERROR: Illegal option -- h base64 -- Encode/decode file as base64. Call: base64 [-e / -d] [options] [infile] [outfile] Options: --copyright Print copyright information -d, --decode Decode base64 encoded file -e, --encode Encode file into base64 -n, --noerrcheck Ignore errors when decoding -u, --help Print this message --version Print version number by John Walker http://www.fourmilab.ch/ ----snip---- -- Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/ +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani |
| ||||
| corrlens wrote: > "mfml03" <mfml03SPAMSUX@dsl.pipex.com> wrote in message > news:40c4c94d$0$22831$cc9e4d1f@news.dial.pipex.com ... > >>corrlens wrote: >> >>>"Jean-Pierre Radley" <jpr@jpr.com> wrote in message >>>news:20040607183420.GA10593@jpradley.jpr.com. .. >>> >>> >>>>corrlens typed (on Mon, Jun 07, 2004 at 05:59:02PM +0000): >>>>| Do you know of unix command that will convert a jpg file into >> >>#!/usr/bin/perl >>use MIME: >>$encoder = new MIME: >>$encoder->encode(\*STDIN, \*STDOUT); > > > When I ran it , it complained about the command *Decoder*, maybe my perl > doesn't have all the libraries.. > > I'll try this after upgrading my perl.. > Yeah, you'll need some modules from cpan. You can decode as well: #!/usr/bin/perl use MIME: $decoder = new MIME: $decoder->decode(\*STDIN, \*STDOUT); |