Decoding email attachments.

  • Thread starter Thomas Williams
  • Start date
T

Thomas Williams

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

filelne = filelne + base64.decodestring(line)

Tom Williams
 
T

Tim Roberts

Thomas Williams said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top