I have a script that will output a jpg, gif or png image. It uses the appropriate content-type according to the extension of the file (which in this case will be the right one always).
The problem is, I have a small number of files which will cause a 500 internal server error when I try to access them this way. However they work if I try to access them with a direct link.
These files have one difference: their color profile is not sRGB built-in, but instead it is "sRGB IEC61966-2.1", or "Uncalibrated".
Why am I getting an error?
My script: http://pastie.org/pastes/404257
EDIT: I changed from include to readfile and it worked. But I don't know why...