Forums

[Plugin: NextGEN Gallery] Thumbnail same size landscape and portrait (9 posts)

  1. isengrin
    Member
    Posted 3 years ago #

    Hello,
    I just tested this gallery, but we cannot have a square within the same size of picture in the biggest lenght.
    We choose the largest size and landscape/portrait have the same size (with of landscape = height of portrait).

    Is it possible ?
    If not, I suggest to add this very usefull option for pictures specialist.

    Thanks

  2. krembo99
    Member
    Posted 3 years ago #

    I ma not sure I follow exactly what you want..
    Do you want thumbnails to be square ? do you want the small image to be square ? do you want the landscape/portrait images to have the same width or length >

    If you want thumbs to be square, it is possible .
    Look for example at this post :
    http://www.vintage-rest.com/?page_id=23 (never mind the strange language)

    now if you will look at the other pages, you will see there are pages of mixed portrait/landscape, all generated from next-gen.
    If this is what you are after, It is (of course) possible, so let me know and I will explain the phases to you .

  3. isengrin
    Member
    Posted 3 years ago #

    Hello,
    Thanks for your help.
    I would like to display thumbs to the same size in the largest dimension and that included in a square space.
    For example, the width display of the portrait have to be 100px and height 150px. the landscape have to display as 150 width and 100 height.
    The dimension of the out square have to be at least 150px.

  4. krembo99
    Member
    Posted 3 years ago #

    In gallery options -- thumbnails you can specify width and hight.
    You can ignore (or not) aspect ration and also crop the thumbs - a thing that will produce more or less what you want (if i understood correctly.
    The boarder you can do with the help of the CSS style.
    Is cropping a problem for you, when talking about thumbs?

  5. isengrin
    Member
    Posted 3 years ago #

    Yes, we can crop, but I don't find that really clean and I don't want to crop pix.
    I think that option I suggest can interest lot of photographers, hope it will be integrated.
    I'll have a look to CSS, but I don't know very well, I will learn.

    But help is well accepted.

    Thanks

  6. krembo99
    Member
    Posted 3 years ago #

    I did not ment to crop the image in photoshop (or similar) but you have a crop option for the thumbs in next-gen options...

  7. BluegrassBoy
    Member
    Posted 3 years ago #

    I'm not sure if this is the same problem that isengrin describes but here is what I'm seeing:

    I set the thumbnail max size to 160 x 120 pixels and unchecked the 'set fix dimension' option. I then regenerated thumbnails. Thumbnails end up 160x120 for landscape oriented photos and 90x120 for portrait. They both show up correctly in the 'manage gallery' interface and in the frontend gallery display. However, the sidebar random photo widget forces all photos to width 160 and height 120, distorting the ones in portrait orientation.

  8. isengrin
    Member
    Posted 3 years ago #

    exactly, that is not beautifull.
    What could be good option is to choose the largest dimension, for example 150px, so I will have 100x150 and 150x100.
    Unfortunatly, that plugin cannot do that YET !
    I hope it will !!!

  9. BluegrassBoy
    Member
    Posted 3 years ago #

    For what it's worth, I was able to fix this for my own purposes simply by removing the style information from the thumbnail image in the widget. Specifically, I changed line 413 of nggwidget.php from:

    $out .= '<img src="'.nggallery::get_thumbnail_url($image->pid).'" style="width:'.$options[$number]['width'].'px;height:'.$options[$number]['height'].'px;" title="'.$image->alttext.'" alt="'.$image->alttext.'" />';

    to:

    $out .= '<img src="'.nggallery::get_thumbnail_url($image->pid).'" title="'.$image->alttext.'" alt="'.$image->alttext.'" />';

    This will stop the browser from stretching the thumbnail in unpleasant ways. It may make rendering slightly less efficient, I don't know, but even so that seems like a fair tradeoff.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.