471,336 Members | 1,234 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

Decoding email attachments.

When I use this line jpg attachment, come out darker
that it's suppose to be.

filelne = filelne + base64.decodestring(line)

Tom Williams

Jul 18 '05 #1
1 1949
Thomas Williams <to******************@yahoo.ca> wrote:

When I use this line jpg attachment, come out darker
that it's suppose to be.

filelne = filelne + base64.decodestring(line)


Compared to what?

I can think of two possibilities. Image applications do color management
differently. So, for example, a JPEG viewed in Microsoft's default image
viewer wil look different from the same JPEG viewed in Photoshop.

Alternately, if you're running Windows, you might be writing the file out
in text-mode instead of using open('xxx.jpg','wb') to write it in binary.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by p r e e t i | last post: by
3 posts views Thread by steve | last post: by
1 post views Thread by Thomas Williams | last post: by
4 posts views Thread by Paul Schmidt | last post: by
3 posts views Thread by LutherRevisited | last post: by
5 posts views Thread by morphex | last post: by
1 post views Thread by Mad Scientist Jr | last post: by
3 posts views Thread by olafmol | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.