Not signed in (Sign In)

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

    • CommentAuthorJhau
    • CommentTimeOct 19th 2005
     
    Hi,

    I've been following your development for quite some time now and feel this is by far the most promising gallery I've seen.

    I especially like the batch importing feature, however one thing I noticed when importing is that it can take quite awhile when trying to a large amount of images. My guess would be that this is because you're using GD lib to resize the images. It could be because I'm trying to run plogger on and old machine as well though ....

    Personally I really like Imagemagick for creating thumbnails and find it to be the best alternative. I was wondering if you guys have any plans of supporting it in future releases.
    •  
      CommentAuthormike
    • CommentTimeOct 19th 2005
     
    Thank you Jhau!

    As far as image output performance, GD and ImageMagick are very close. I think GD may be a bit faster actually. Sticking with GD, there are a couple ways to speed up the import process on a slow machine.

    One, take out the thumbnail generation from the add_picture function. Line 116 and 117 of plog-admin-functions.php.

    $thumbpath = generate_thumb($picture_path, $result['picture_id'],'small');
    $thumbpath = generate_thumb($picture_path, $result['picture_id'],'large');

    You can delete or comment out these lines from the file. The result of this will be that Plogger will generate thumbnails "on-the-fly", the first time a gallery is viewed. This will slow down the page loading for people viewing your gallery (if they are the first to view it), but will increase the speed of the import.

    Another way to speed up the import without sacrificing the "pre-caching" code above is to lower the image quality number in the options menu. The lower the number, the higher the compression, the faster the thumbnails will be generated. The downside to this is poorer thumbnail quality. Note that in Beta 2, you have to delete the thumbnails or change the thumbnail size before any compression changes will have an effect (for pre-existing images).

    We don't have any plans to switch to imageMagick anytime soon, as doing so would require us to change out our underlying thumbnail generation library. If anyone has any other ideas on how to speed up the import, post 'em here.
    • CommentAuthorJhau
    • CommentTimeOct 19th 2005 edited
     
    Wow thanks for the quick reply. However this has me a little confused. I'm using beta 2 and I'm assuming the lines you're talking about have changed to this now.

    $thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_SMALL);
    #$thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_LARGE);

    In any case I commented out the first (second line seemed to be left out already) and your suggested solution works fine.

    However for some odd reason when I click on a thumbnail in the gallery it seems to try and resize the large "lrg-" picture everytime I click it. This causes the image to load quite slowly. It seems like plogger thinks it needs to regenerate the thumbnail for whatever reason, everytime I click it. But why I don't know. Having removed these lines in plog-functions.php fixes the problem:

    if ($phpThumb->GenerateThumbnail()) {
    $phpThumb->RenderToFile($thumbpath);
    }
    else {
    // do something with debug/error messages
    die('Failed: '.implode("n", $phpThumb->debugmessages));
    }

    I suppose this would however get in the way if I wanted to change the size of all intermediate thumbnails. I wonder if anyone else has this problem.
    • CommentAuthorJhau
    • CommentTimeOct 21st 2005
     
    Ok I found a quick and dirty way to use Imagemagick instead gdlib, one of the reasons Imagemagick is better for me is because my host uses the gdlib 1.6.2 which doesn't produce nice quality thumbnails like gdlib 2.+ does. If anyone is interested I replaced these lines in plog-functions.php:

    if ($phpThumb->GenerateThumbnail()) {
    $phpThumb->RenderToFile($thumbpath);
    }
    else {
    // do something with debug/error messages
    die('Failed: '.implode("n", $phpThumb->debugmessages));
    }

    with this:

    $imagemagickPath = "/usr/local/bin"; // set this to YOUR imagemagick path
    exec ("$imagemagickPath/convert -geometry " . "{$phpThumb->w}x{$phpThumb->h} " . "'$source_file_name' '$thumbpath'");

    I should note it wasn't of much benefit as to the speed of resizing. However for those running an older version then GDlib 2 this seems to be a good solution for getting better quality thumbnails. It still seems to try to replace the large thumbnail everytime I load it the image though ....
    • CommentAuthorhcgtv
    • CommentTimeFeb 23rd 2006
     
    From everything I've read, ImageMagick produces better thumbnail images.

    Am I wrong to assume this?
    • CommentAuthorzbouby
    • CommentTimeJan 7th 2007
     
    Thank you so much Jhau for you Imagemagick solution, It allowed me to create thumbnails with beta 3, what I wasn't able to di before du to a problem with thumbnail size.