Outputting images to a file through OB_start()

view story

http://ubuntuforums.org – Hello all, I have a small problem here. I am using the CodeIgniter framework for an application I am extending. No choice there. However one of the things I have had to add is a reporting system, which includes header images, and the ability to download these reports as files. Outputting to a browser is fine, and outputting to a file is mostly fine, and downloading the file is fine. I am using ob_start(), ob_get_contents() and ob_end_flush() along with fopen and fwrite to handle both outputs. The image of course works fine in the html side of things, but when outputting to a file, (Hardware)