Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorNick C
    • CommentTimeOct 23rd 2005 edited
    UPDATE: forum entry added here:

    Hi, let me start by saying that I love this app. It finally convinced me to switch from my custom coded gallery to a distributed product (I've never been able to find the right balance between features and bloat in these products)

    One thing was missing, however, the ability to resize images automatically and watermark them without furthur interaction. So... I wrote a plug-in to do it for me...

    Basically it took me bloody ages, but it's been coded in such a way that if there is a demand for it then I could potentially distribute it. I'd still need to package it up and write instructions but I could have that done in a week or so if people want it.

    I have put a couple of screenshots up here:

    and you can look at my site and the resized / marked pictures while you're there :)

    Please excuse the current content, as I say I'm migrating things across and still getting happy with Plogger's settings.
    • CommentTimeOct 23rd 2005
    that's very cool indeed.
    • CommentAuthorpuk
    • CommentTimeOct 23rd 2005
    That is very cool and i would be very interested, i'm writing a site for a artist to put their portfolio up, and the watermarking is really the one thing that plogger lacks for my needs, although i'd be rather after a watermark straight through it and not just in the corner.

    But very cool!
    • CommentAuthorjack
    • CommentTimeOct 24th 2005
    Looks very good. Personally I don't need the watermarking (yet), but the automatic resizing is very usefull when installing plogger for others who don't know how to resize them before uploading.

    The dimensions: when a square image is uploaded, will that also be stretched to fit the 800x600 dimensions? Or can it be changed into a max. height or width?
    • CommentAuthorNick C
    • CommentTimeOct 24th 2005 edited
    Hi all, thanks for the feedback... looks like I might have done something useful for once ^__^

    To answer the Qs / comments:
    JACK - The script can tell the difference between landscape and portrait pictures and will then treat width and height, respectively, as the primary dimension. Actually there is no stretch going on. I don't like things messing with the dimensions of my images :) so in the photo is a non-standard size because it‚??s scanned rather than a digipic. Thus, when resized the width is the specified 800 but the height is only 555px, again, it should actually be quite easy to have an ‚??maintain proportions‚?Ě option to turn this on/off.

    Another good example would be this image: which is actually a very large panorama made from maybe 4 images but resized down to a width of 800px (in my opinion this is the better than treating height as primary) So, a square image would be kept square :)

    Also the script does a few basic checks (like not ENLARGING images which are less than the ‚??shrink‚?Ě sizes!)

    [edit]: oh yes, there is still an issue in regard to font size. Because the font size is fixed (defaults to 25 but I use 15) the text is not an identical size in every image. I have been considering adding a proportionality kind of calculation (eg size 15 would be equivalent to size 15 at 800x600 and then do the math to srhink/enlarge it as necessary) but it's not there yet because I haven't needed it, again, give it time...

    PUK - The reason the code only allows watermarking in the bottom right is because that is where I've traditionally had my own marks. In theory (and subject to some thought in regard to the mathematics of php bouncing boxes) I could include an option for placement, and also for colours, although this will need a bit of research beforehand.

    On that note, I have a question. Is there any standard way to write plug-in for plogger (eg phpBB‚??s standard) or is it a bit too new? I should also mention at this point, that while I‚??ve coded extensively for myself and sites I've written, I‚??ve never released any code before (and the standard needs to be significantly higher). So, I‚??d like to take the code I have now, tidy it up, package it, and release something in the next few weeks before looking to add the other features I‚??ve mentioned above, but bear with me, this is a new one for me! >__<

    Seeing as I'm going ahead with this I have added a forum page to my website to discuss the issues and post updates on my progress:
    • CommentAuthorjack
    • CommentTimeOct 24th 2005
    Nick, I'm looking forware to the tidy version :).

    I know Mike and Anti are thinking about a more decent plugin structure, but I doubt this will already be in version 1, but you can always contact them about it.

    I think Puk is right about the watermark. The way it is now it can easily be 'stamped' away with photoshop. It would be better to have the watermark straight through the image and much bigger as it is now. It would ruin the image... but that's what it would be all about?

    Again, I don't need the watermarking right now, but I'm just adding my own thoughts... :)
    • CommentTimeOct 24th 2005
    Nick, I like where you're going with this. Did you know that PHPThumb, our underlying thumbnail library, supports automatic image watermarking and text watermarking?

    All you have to do is set the filter (fltr) attribute of the phpThumb object (within generate_thumbnail).

    "wmi" (WaterMarkImage)
    [ex: &fltr[]=wmi|<f>|<a>|<o>|<m>] where
    <f> is the filename of the image to overlay;
    <a> is the alignment (one of BR, BL, TR, TL, C,
    R, L, T, B, *) where B=bottom, T=top, L=left,
    R=right, C=centre, *=tile);
    <o> is opacity from 0 (transparent) to 100 (opaque)
    (requires PHP v4.3.2, otherwise 100% opaque);
    <m> is the edge (and inter-tile) margin in percent
    - "wmt" (WaterMarkText)
    [ex: &fltr[]=wmt|<t>|<s>|<a>|<c>|<f>|<o>|<m>|<n>]
    <t> is the text to use as a watermark;
    <s> is the font size (1-5 for built-in font, or point
    size for TrueType fonts);
    <a> is the alignment (one of BR, BL, TR, TL, C, R, L,
    T, B, * where B=bottom, T=top, L=left, R=right,
    C=centre, *=tile);
    <c> is the hex color of the text;
    <f> is the filename of the TTF file (optional, if
    omitted a built-in font will be used);
    <o> is opacity from 0 (transparent) to 100 (opaque)
    (requires PHP v4.3.2, otherwise 100% opaque);
    <m> is the edge (and inter-tile) margin in percent;
    <n> is the angle

    As you can see, quite a bit of functionality just waiting to be used. I haven't seen your code yet, so you may be using this already. But if not, I just thought I'd give you a heads up so you're not adding any unnecessary code to the plugin.

    More information within the /lib/phpthumb/docs/ folder of your Plogger installation.
    • CommentAuthorNick C
    • CommentTimeNov 13th 2005
    Apologies to those who have been emailing me asking when I will be release the code for this.

    The answer, to save lots of emails, is as soon as I get the chance... I have rather a lot on at the moment which has prevented me from devoting much time to this.

    • CommentAuthoredwin
    • CommentTimeJun 24th 2010
    As this thread is almost 5 years old, I think it's safe to assume the plugin mentioned has never been finished.

    I hope that the developers of Plogger, or some other kind soul, will make such a thing because I think that is the only thing missing right now.
    • CommentAuthorchewbears
    • CommentTimeJun 29th 2010
    Correct this plug in never saw the light of day. You can add a watermark using php, search my name and there is a how to I wrote about it. Resizing again you can do via php but I do not know if anyone has a thread posted about how to go about it.