Re: decode an 8 bit encoded image
| From: | Michael Gauthier | Date: | Mon, 11 Jan 2010 22:57:10 +0000 |
| Subject: | Re: decode an 8 bit encoded image | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53204@lists.php.net to get a copy of this message | ||
On Sun, 2010-01-10 at 08:46 -0800, Michel Corne wrote:
> Hi.
>
> Mail_mimeDecode::_decodeBody handles '7bit', 'quoted-printable',
> 'base64' but not '8bit' unless I missed something. Hence my question :-)
> Any other ideas?
> Is there a source code for an 8bit decoder (even in another language) available somewhere?
>
Hi Michel,
If you are able to parse the email into mime parts (using Mail_mime for
example), the '8bit' or 'binary' encoding shouldn't need any special
decoding. The Mail_mimeDecode package just returns the data (much like
how it just passes through text data when using '7bit' encoding).
You'll need to know what image format (JPEG, PNG, etc) the image was
encoded in in order to save and/or view it properly. You may also need
to know the endianness of the binary data to decode it properly.
Hope this helps,
Mike
>
> ________________________________
> From: Ken Guest <ken@linux.ie>
> To: Michel Corne <mcorne@yahoo.com>
> Cc: pear-dev@lists.php.net
> Sent: Sun, January 10, 2010 12:03:29 PM
> Subject: Re: [PEAR-DEV] decode an 8 bit encoded image
>
> http://pear.php.net/package/Mail_mimeDecode should work for
> what you need to do.
>
> On Sun, Jan 10, 2010 at 8:48 AM, Michel Corne <mcorne@yahoo.com> wrote:
> > Hello,
> >
> > How do you decode an 8 bit encoded image emailed as an attachment
> > (Content-Transfer-Encoding: 8bit) ?
> >
> > Thanks,
> > Michel
> >
> >
> >
>
>
>
> --
> http://blogs.linux.ie/kenguest/
>
>
>
>