Quote:
Originally Posted by Aidan
I'm not sure that the code you suggest will work, although I haven't tried it. The problem is that the imagejpeg function appears to send the image to the browser.
We can't take the size of the file on the disk/database, as we've made modifications to the image, and hence it's size is different. This code is doing it on the fly, rather than storing it with the watermark in it.
|
You are correct, imagejpeg does send to the browser, however OB() is output buffer and stuffs it in a var for you to echo it, so you can then work with it or use the example above.
There are alot of articles on image manipulation. All frown on the use of image manipulation on the fly. The bench marks on vBGarage doing image resize on the fly would have made you cringe. We have since changed it. Just a note.