Piwigo.org

You are not logged in. (Register / Login)

Announcement

Post a reply

Write your message and submit

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

plg
2012-05-12 21:32:31

PeteSlaughter wrote:

Will this include the watermark utility?

What do you mean?

PeteSlaughter
2012-05-11 21:43:43

Will this include the watermark utility?



Thanks,
Pete

plg
2012-04-30 13:08:43

Perfect, thank you rvelices, [Subversion] r14584

rvelices
2012-04-30 12:09:37

plg wrote:

Thank you rvelices, I've fixed the form submission :-) [Subversion] r14580

I think you don't need
$types[$type] = $params;
and
ImageStdParams::set_and_save($types);

just ImageStdParams::save();

because we are working with objects - they are never passed or returned by value (array, strings, basic types are ...). You are always working on the same instance (new ones are created explicitely by new, clone, unserialize ...)

plg
2012-04-30 11:45:27

Thank you rvelices, I've fixed the form submission :-) [Subversion] r14580

rvelices
2012-04-30 06:33:17

mistic was right about setting the use_watermark

the algo should be straightforwared
for each get defined type map as param
{
old_wm = param->use_wm
apply_global(param)
if old_wm!=param->use_wm or
param->use_wm and wm changed)
{
... param has changed
}
}

mistic100
2012-04-29 13:17:50

there is a small bug in ImageStdParam::apply_global, the parameter 'use_watermark' is correctly updated to 'true' but not to 'false'

Code:

Index: derivative_std_params.inc.php
===================================================================
--- derivative_std_params.inc.php  (revision 14512)
+++ derivative_std_params.inc.php  (working copy)
@@ -170,6 +170,10 @@
     {
       $params->use_watermark = true;
     }
+    else
+    {
+      $params->use_watermark = false;
+    }
   }
 
   private static function build_maps()

in addition to that Pierrick and I think sizes limits must be treated in OR mode instead of AND, allowing for exemple panoramas (1200*250) to have a watermark when small square (400*400) don't

Code:

Index: derivative_std_params.inc.php
===================================================================
--- derivative_std_params.inc.php  (revision 14512)
+++ derivative_std_params.inc.php  (working copy)
@@ -166,10 +166,14 @@
   {
     if (!empty(self::$watermark->file) &&
         (self::$watermark->min_size[0]<=$params->sizing->ideal_size[0]
-        && self::$watermark->min_size[1]<=$params->sizing->ideal_size[1] ) )
+        || self::$watermark->min_size[1]<=$params->sizing->ideal_size[1] ) )
     {
       $params->use_watermark = true;
     }
plg
2012-04-29 09:38:06

I've just commited this new screen in [Subversion] r14512 (see [Bugtracker] feature 2626).

My problem is that I didn't find the correct algorithm to detect if a derivative must be updated or not : the $new_params->use_watermark is not correct. I don't know how to force Piwigo to take the new watermark configuration into account (in admin/include/configuration_watermark_process.inc.php). I will restart to work on it tonight.

rvelices, if you can take a look today, that would make the 2.4.0RC3 more sure to be released today :-)

plg
2012-04-21 23:22:38

Hi,

I'm working on watermark configuration screen. Here is how my draft looks like.

http://piwigo.org/forum/showimage.php?pid=129282&amp;filename=localhost+screen+capture+2012-4-21-23-19-23.png

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013