Oh, I see. You probably need the "Content disposition" header
use:
code:
header('Content-disposition: inline; filename=example.bmp');
You may want to define the diposition as attachment (instead of inline) if you want the image to prompt a download dialog instead of showing in the browser.
Btw, Content-length is not really needed, but it's "good protocol" to add it.