Watermark Scaling w/ Scaling Factor

There are situations in which it turns out that the watermark image is considerable larger compared to the image that is going to be watermarked. In these scenarios Asido applies watermark scaling. This means that the watermark is resized so its dimensions become some portion of the image that is going to be watermarked. This feature can be turned on and off by using the ASIDO_WATERMARK_SCALABLE_ENABLED and ASIDO_WATERMARK_SCALABLE_DISABLED constants. By default, the featured is enabled, and the scaling factor is taken from the ASIDO_WATERMARK_SCALABLE_FACTOR constant. If you want you can re-define this constant, or just provide a decimal value (0 < scaling_factor < 1) instead. By default, the scaling factor is 0.25 (1/4).



Here you can see the source image, the watermark image, and the result:

 Source Image  Watermark  Result

You can download the source for this example from here:

5 коментара to “Watermark Scaling w/ Scaling Factor”

  1. jammy Says:

    i got an error.. while making those sample.

    Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.

    class.driver.php on line 239
    class.driver.php on line 545
    class.driver.php on line 556

    it works on my local machine.. but not on my server. since i dont have access to the php.ini

    any help please?


  2. admin Says:

    I guess you are using PHP5, right ?

  3. jammy Says:

    yup! I am using PHP 5 in my server and I am using php 4 in my localhost… oh.. i didn’t know that they are using php 5 until you replied!

    any ideas? I looked in the documentation but can’t seem to find one.


  4. admin Says:

    The issues are due to the stricter error reporting rules available in PHP5, which are obviously enabled on your hosting. One way to hide those warnings is to alter the error reporting setting on your hosting.

    Since the Asido involvement in the GoPHP5 project, there will be a php5-only release soon, which will have all these warnings and notices fixed.

  5. Miguel Puig Says:

    Yeah I got the same problem and Ive Dreamhost Hosting running PHP5, any ideas??

Powered by WordPress
Asido: PHP Image Processing Solution