I'm using phpThumb in a script to clean my images and add a wat开发者_开发技巧ermark to them. We have images of very different sizes (from 100px width to 800px), so no matter what watermark image I use, it's either going to look too small or too big on the image.
Do you know of a way to tell phpThumb to resize the watermark? Or is there a way to resize the watermark image (depending on size of image being watermarked)?
Thanks a lot guys! Ali
I am facing the same issue.
Maybe you could put some if statements in the phpthumb.config file in the DEFAULT PARAMETER SECTION
then depending on the height and width parameters you can decide to use different files with varying sizes for the watermark.
make sure you change $PHPTHUMB_DEFAULTS_GETSTRINGOVERRIDE to false
This is not perfect cause you could not know the source image size to start with.
but it would be a better fit based on the parameters passed to phpthumb.
I guess the only other solution would be to use phpthumb as an object but that would require a lot of work.
精彩评论