Permanant watermark with undo possibility (GD2+IMagick) - Page 6 Permanant watermark with undo possibility (GD2+IMagick) - Page 6
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Permanant watermark with undo possibility (GD2+IMagick)

Started by Stramm, March 26, 2005, 06:09:36 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

freesouljah

that is strange...the original should be 700 px tall (not 524)...that is why they appear to be 'stretched out'...they actually are  ???

Stramm

I'll have a look what maybe go wrong there.

To the updatethumbs.php problem... it's the board's code tag that caused the problem. I've added another linebreak that should fix the prob (related to EOT). Just repace the updatethumbs.php file

freesouljah

Quote from: Stramm on July 31, 2005, 04:57:59 PM
To the updatethumbs.php problem... it's the board's code tag that caused the problem. I've added another linebreak that should fix the prob (related to EOT). Just repace the updatethumbs.php file

cool..excellent work  ;D  makes it much easier...

thanks

Stramm

I had a look at your pic and experimented a lil bit with it. The standard function to calculate the resize ratio won't work properly under some circumstances. That's fixed now. You'll have to update picmgmt and updatethumbs... the messed up ones can be fixed with the admin tool

freesouljah

now the util.php gives me a blank page when I try to update thumbs...


I finally saw what the other admin modification you made for me does...and unfortunately, it is not quite what I was hoping for.  Rather than an option for the admin to disable the watermark...I was hoping that it might be automatically disabled for anybody but the admin (or need the admin to turn it on while in batch add)...

if this is a problem...don't worry about it, its not that big of a deal...

thanks

Stramm

to revert the functionality is easy... watermarking permanently off and only admin can turn it on while uploading

for now it works watermark on and admin can disable watermarking while uploding

I'll attach the updatethumbs file above to avoid board problems with the code tag again

freesouljah


rcsmith

How do you make it so it never backs up any files?  I have so many albums I can't get into the admin tool because my mysql will hit 100% and kill the server.  I'd like to just disable the backup process.

thanks!

Stramm

the backup of the file doesn't have anything to do with your mysql load. You just need ~30% more HD space as your orig image consumes. That's it.

to remove the backup delete in picmgmnt.inc.php  (not tested... !!!!)

if (!file_exists($orig) && $CONFIG['enable_watermark'] == '1' && ($CONFIG['which_files_to_watermark'] == 'both' || $CONFIG['which_files_to_watermark'] == 'original'))  {
// if copy of full_sized doesn't exist and if watermark enabled and if fullsized pic watermark=true -> then we need a backup
if (!copy($image, $orig))
                return false;
else
$work_image = $orig;
}


something similar you'll find in util.php as well.. delete it too (that's for batch add). However I don't recommend it... maybe if you're running low on HD space. But the load is no reason at all.. and to copy once an image as backup while uploading doesn't need much resources as well. Compared to the image processing it's maybe <1%

rcsmith

thank you i'll give this a try.  My server only has 3% left so that's probably a problem too.

mylogon

#110
I have installed the mod and have a couple of questions/problems:

Quote- admin can disable watermarking whilst upload (checkbox added to upload form)
Which upload form?  Not in single, not in batch (I really wish batch would someday work  :\'( for more than a couple of images  -or work all the time - not when it feels like it) and I do not see an option in the Xp wizard.

QuoteSo in Admin Tools just use 'Update thumbs and/or resized photos' to apply or remove watermarks
Where is the choice to remove?  Do you just set the option to no watermark in config?

I do see where to remove all backups, just not the undo

It does watermark - so I know it is working but only for the main image - not the thumbnail and I do have 'Both" set.  It does not do it in uploading or admin tools.  Admin tools I have "Both thumbnails and resized pictures" set.  It also does not do thumbnails when I have it set to only update thumbnails.

Linux - same results with both GD and Imagemagic.  I even renamed updatethumbs and reinserted it just to try that.)

Does this not do thumbnails?

(Does anyone have a patch file for this entire setup?  That sure would be a whole lot easier then trying to figure out what and where things go  -just a little confusing at first and second read....  (I was going make a patch file, but not working correctly enough to do so yet :-[))


Stramm

Quote- admin can disable watermarking whilst upload (checkbox added to upload form)
this is an additional mod. With it the admin has the possibility whilst uploading to decide not to watermark certain images. It is not part of the base mod

QuoteWhere is the choice to remove?  Do you just set the option to no watermark in config?
I haven't invented the admin tools. So it's a good idea to have a look in the manual. The admin tools just recreate images/ thumbs based on the config settings.

QuoteIt does watermark - so I know it is working but only for the main image

answer is in the first post:
QuoteWhich files to watermark - normal sized, full sized or both
Why would one want to watermark thumbnails???

The instructions in the first two posts are complete. However there are functionality hacks that aren't useful for the maiority of users (like the disabling watermarking for admin whilst upload, different watermarks for users and bettr admin tools). This additions you can find in the thread.

If you really need thumbnail watermarking and you have very basic php knowledge then you can do some copy/paste programming to adapt picmgmnt.inc.php to your needs

mylogon

I thought you were saying that the restore was part of your admin tools.  Thumnails are stolen just as much as regualr pics - even would be more so if they are not watermarked - that's why I was looking for it.  Probably better that the restore it is not in the admin tools.  It makes it harder for someone to accidentally restore them.


Stramm

there is a restore. Usually when you watermark an image you can't undo the watermark. If something wents wrong or your watermark just sucks, you once want to have a different sized intermediate pic... bad luck, you can't undo the changes. This mod makes a backup of the original image. So if you turn off watermarking in config and rebuild normal and fullsized pics then they won't have watermarks anymore. You can apply a new one... sure, no problem at all. If you think you don't need the backup cause all's to your likings... then you can delete them and noone has a chance to catch your backups.

As said, you can enhance the mod to watermark thumbnails too. I just think it looks disgusting and don't use that.
Yes, you should protect your work. Therefore I've written this mod. But you can do to much as well. If you annoy your visitors to much (with the ugly view of watermarked thumbs) I believe they pretty much will avoid your site.

mylogon

Now I understand the restoring of the original images.  That is what I was asking.  The thumbnails - well a client asked.  they are night club promoters and people  swipe their images to put on MySpace.com  -as a thumbnail size.  They load of their home page with pictures of them.   That why he asked.

Maybe I will look at the changing that.  Have you thought of posting a patch file to do all of the manual changes in the part that you have written?  I can send one to you  - as I made an entire backup before I started as I knew I would end up setting up multiple galleries and did not want to do all that hand work again.


Stramm

No, I don't have files here anymore with just the changes for the watermark mod, sorry

Problem with the thumb watermarking can be the watermark size. If chosen to big it can take up the entire thumb size. So you may want to check if you watermark a thumb or a normal/ fullsized Image. If it's a thumb then resize the watermark image before applying it.

mylogon

I do have the patch file if you want it.  (I did your mod before any of the other ones on a clean install - so I know it is clean.)


Stramm

If it's 1.34.. then it'll be very nice if you send me the files. Will make an install version for all my mods

mylogon

I should have it for 1.34 soon.  I use Fantastico and they have not updated to 1.34 yet.  Soon, I hope....


genom

#119
hey I installed your hack
but when I update it in configuration
that watermark will be enabled
it doesnt really update it
and returns to set on "no" instead "yes"
like I didnt even changed it
whats the problem?
please help me
also when I go to util.php
it gives me this:
Parse error: parse error, unexpected T_LNUMBER in /home/healthnfit/domains/healthnfit.org/public_html/cpg132/util.php on line 481