vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Watermark images (on the fly) (https://vborg.vbsupport.ru/showthread.php?t=68112)

Logikos 08-10-2004 05:44 AM

Quote:

Originally Posted by Highlander
depnediung 10 or 20 seconds till the images loads when i cklick on a thumbnail ..

*going to remove it till its working or anyone knows why its not showing up ..

Ditto......

Ming Keong 08-10-2004 06:27 AM

The watermarking works great, but images are indeed loading much slower than they used to.

Here's an example of the watermarking for those requesting for one: http://www.pdatrends.com/attachment....tachmentid=676

lifesourcerec 08-10-2004 06:32 AM

heh, I'm on broadband and that was still slow.

Jolten 08-10-2004 07:20 PM

Quote:

Originally Posted by Ming Keong
The watermarking works great, but images are indeed loading much slower than they used to.

Here's an example of the watermarking for those requesting for one: http://www.pdatrends.com/attachment....tachmentid=676

If that image is an indication of how images load.. I'll pass.

juanchi 08-11-2004 02:25 AM

I will definitley call this a great hack but the loading problem keeps this hack from becoming a clasic.

Robbban 08-11-2004 04:14 PM

Hmm, yes... I noticed that the "on-the-fly" watermarking isn't good for performance. Going to modify this and release a version that watermarks the uploaded image so the script doesn't have to watermark every image everytime someone requests it.

It will probably be release tonight (in 5h) :D

For you with problems, here are something to notice:

* It's been tested and developed for version 3.0.3
* watermark.PNG and watermark.png is two diffrent filenames. On unixsystem watermark.PNG will NOT work.
* Live demo can be seen at *WARNING, ADULT SITE* www.synd.nu

Johnny 08-11-2004 07:13 PM

Quote:

Originally Posted by Robbban
Hmm, yes... I noticed that the "on-the-fly" watermarking isn't good for performance. Going to modify this and release a version that watermarks the uploaded image so the script doesn't have to watermark every image everytime someone requests it.

It will probably be release tonight (in 5h) :D

For you with problems, here are something to notice:

* It's been tested and developed for version 3.0.3
* watermark.PNG and watermark.png is two diffrent filenames. On unixsystem watermark.PNG will NOT work.
* Live demo can be seen at *WARNING, ADULT SITE* www.synd.nu


sweet i cant wait..

WretchedXXX 08-12-2004 05:56 AM

Any updates yet?

Beermonster 08-12-2004 08:39 AM

Quote:

Originally Posted by SIINSI
Very cool, However it is not working in 3.0.1

This is what I have at the end of my attachment.php

echo $attachmentinfo["$imagetype"];
}

Any ideas on how to get this working with 3.0.1?

Thanks,
Miguel


This is a cool hack works well but for it to work on 3.0.0 and by the look of it 3.0.1 you will need to use this code.

find:
Code:

echo $attachmentinfo["$imagetype"];
And replace it with:
Code:

        if (strpos($attachmentinfo['mimetype'],"image/jp")) { $isjpg = 1; }
        if ($isjpg && !$_GET['thumb']) {
            $filename = "/home/your/path/watermark.png"; // use a PNG-24 to preserve transparency!

            $im = imagecreatefromstring($attachmentinfo['filedata']);
            imagealphablending($im, true);

            $watermark = imagecreatefrompng($filename);

            $y = imagesy($im) - imagesy($watermark);

            $w = imagesx($watermark);
            $h = imagesy($watermark);
       
            imagecopy($im, $watermark, 0, $y, 0, 0, $w, $h);

            imagejpeg($im, "", 80);
        } else {
                echo $attachmentinfo["$imagetype"];
        }

Remembering to change your /home/your/path/watermark.png

[high]* Beermonster clicks install[/high]

Deska 08-12-2004 09:29 AM

This hack work fine at vB 3.0.3
But watermark wont transparant although I use PNG-24 Type

Any idea?


All times are GMT. The time now is 07:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01117 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete