A: 

Maybe the result is getting truncated? Try wget or curl to fetch the file directly and cmp it to the original image; that should help debug it. Beyond that, post your full code and environment details even if it's simple.

Ken Arnold
+2  A: 

As you haven't posted the code, here is a simple code which correctly works with python 2.5 on windows

from wsgiref.simple_server import make_server

def serveImage(environ, start_response):
    status = '200 OK'
    headers = [('Content-type', 'image/png')]
    start_response(status, headers)

    return open("about.png", "rb").read()

httpd = make_server('', 8000, serveImage)
httpd.serve_forever()

may be instead of "rb" you are using "r"

Anurag Uniyal
+1  A: 

It had to do with \n not being converted properly. I'd like to thank Alex Martelli for pointing me in the right direction.

Evan Fosmark