GD2 and watermarking images [solved]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
php3ch0
Forum Contributor
Posts: 212
Joined: Sun Nov 13, 2005 7:35 am
Location: Folkestone, Kent, UK

GD2 and watermarking images [solved]

Post by php3ch0 »

I have a databse of over 10,000 books with covers a client wants me to make into an ecommerce site. He wants all the covers watermarked. I am considering using a php script to add the watermark every time the image is loaded.

I want to know if this process would use up a lot of processor time and make the web site run slow.

The most images that would be shown on one page is the search page that loads 20 products at a time?

Suggestions please
Last edited by php3ch0 on Fri Jan 18, 2008 5:08 am, edited 1 time in total.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: GD2 and watermarking images

Post by VladSun »

It's much faster to have images watermaked at the upload time (or offline), instead watermaking them in real time (at view time). This way, you perform the watermark only once, at the expense of doubled storage space (in case you want to keep the original, unwatermaked images).
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: GD2 and watermarking images

Post by Inkyskin »

I would batch mark the exising ones, and then re-upload them. Then watermark during upload for any new ones.

As VladSun says, watermarking on the fly can be quite slow.
User avatar
php3ch0
Forum Contributor
Posts: 212
Joined: Sun Nov 13, 2005 7:35 am
Location: Folkestone, Kent, UK

Re: GD2 and watermarking images

Post by php3ch0 »

Thats all OK but I do not fancy watermarking all the images offline, it would take me ages. Do you know of a tool that could do it in a batch. Then any new ones could be watermarked at upload time.
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: GD2 and watermarking images

Post by Inkyskin »

Google is your friend: Click me!
User avatar
php3ch0
Forum Contributor
Posts: 212
Joined: Sun Nov 13, 2005 7:35 am
Location: Folkestone, Kent, UK

Re: GD2 and watermarking images

Post by php3ch0 »

Thanks People
Post Reply