voidet
12-21-2005, 01:45 PM
Hey Everyone!
Well i wanted something that automatically adds a watermark to my images for my site articles.
The image manager is amazingly weak, but was used to add this feature. What it does:
Demo @ www.nightgen.com
1. Adds a link under delete image called "Brand Image"
2. Confirms if you would like to brand the image
3. Once confirmed it will firstly thumbnail the image to a prescribed width/height.
4. Then it will add a random water mark, i added a set of 10, which will be randomly place on my images.
5. Then it will determine hwo to place the text on the page, aligned to bottom right.
6. Then it will add text to the bottom right corner based on the file name, minus the extension and truncated if need be, based on words, not characters. The text has a shadow of black.
7. Once that is done it will rename the old file name to "filename"old.jpg and the new one will have the old name :)
8. You can choose what font you want to use :) i use Arial
But warning, all of this was hardcoded for my site,
I didnt intend to release this as a mod, so you will have to sift through the code and find what does what.
Basically all you will need to do is determine what size you want to be thumbnailed (max width or height) this can be changed in imagemanager.php. Build your watermark PNGs. Then go into THumbnail.class.php and select your font, the cut off for the trunacting and then the full path to the font file.
If i have forgot to add something sorry,
But i really don't have a heap of time to rewrite the code for user friendlyness, as i said i only made the mod for the purpose of my site.
Next mod i wanna make is an image rename in the image manager, wont be too hard!!
Have fun :D:D
[attachmentid=225]
Well i wanted something that automatically adds a watermark to my images for my site articles.
The image manager is amazingly weak, but was used to add this feature. What it does:
Demo @ www.nightgen.com
1. Adds a link under delete image called "Brand Image"
2. Confirms if you would like to brand the image
3. Once confirmed it will firstly thumbnail the image to a prescribed width/height.
4. Then it will add a random water mark, i added a set of 10, which will be randomly place on my images.
5. Then it will determine hwo to place the text on the page, aligned to bottom right.
6. Then it will add text to the bottom right corner based on the file name, minus the extension and truncated if need be, based on words, not characters. The text has a shadow of black.
7. Once that is done it will rename the old file name to "filename"old.jpg and the new one will have the old name :)
8. You can choose what font you want to use :) i use Arial
But warning, all of this was hardcoded for my site,
I didnt intend to release this as a mod, so you will have to sift through the code and find what does what.
Basically all you will need to do is determine what size you want to be thumbnailed (max width or height) this can be changed in imagemanager.php. Build your watermark PNGs. Then go into THumbnail.class.php and select your font, the cut off for the trunacting and then the full path to the font file.
If i have forgot to add something sorry,
But i really don't have a heap of time to rewrite the code for user friendlyness, as i said i only made the mod for the purpose of my site.
Next mod i wanna make is an image rename in the image manager, wont be too hard!!
Have fun :D:D
[attachmentid=225]