zpGallerificv1.4 Rectangular croped images

I am trying to find if there is a setting to get proportional crops instead of the rectangular ones for the album thumbnails. It looks like the demo on gir-web's site is doing this with some of the albums, like nature. Is this done by custom code, or an options I can't find?

Comments

  • acrylian Administrator, Developer
    Please read the theming tutorial and review the functions documentation on customimage functions.
  • gjr Member
    Uncheck the "crop" checkbox in theme options.
  • Hmm... It looks like a simple checkbox won't work, I will have to dig in a bit. When I look at the album.php file, there is this line to get the album thumbnails:

    " title="<?php echo gettext('View album:'); ?> <?php echo getBareAlbumTitle();?>"><?php printCustomAlbumThumbImage(getBareAlbumTitle(),NULL,238,100,238,100); ?>

    The image size is hard coded there.
  • Some themes do that when the size of the image/thumbnail is also encoded in the CSS. So you should experiment to see if changing the size disrupts the page layout.
  • Ok, here is what I found. First, I had the wrong file. It was gallery.php.

    Then, the template is using printCustomAlbumThumbImage which will crop the image. (didn't quite get the difference between size and crop parameters). Not what I thought I wanted. I changed to using printCustomAlbumThumbMaxSpace instead. This did give me full height portrait images, but I would have had to mess with other bits too much tonight to get it to look right.

    My solution: I went back to the original function, but instead of 100h, I used 158h which I got from the ratio of 4x6 (very close to un-cropped image) using the 238w that was there. This makes my landscape shot images fit perfectly, and my portrait shot images have more breathing room. I can live with that for now :-) I had to tweak the li the image/title/desc was in to give it more space too.

    I guess this thread is solved.

    Here is the gallery if anyone is interested.

    My gallery
Sign In or Register to comment.