Image processing and output using GD in php

knodaytucound

New Member
I want to control the display of images with the PHP GD library -- I am going to add some text to the bottom corner of it on the fly when a browser requests the image, rather than saving the text into the image.I know that I can do this: set the MIME type in the header and then call \[code\]imagepng(...)\[/code\] with the filename to just display the image to the browser, but how would I embed it in a document? Like,\[code\]<img src='http://stackoverflow.com/questions/2010742/somefile.php?i=1' ... />\[/code\]do I just call \[code\]imagepng\[/code\] with the filename but without setting the headers?Also, if someone copies the image source out of the source code and navigates to it in the browser... what will happen if the headers aren't set? Will the image display as if the actual image was requested?
 
Back
Top