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.
|