Page 1 of 1

SOLVED - Distorted image in gallery view

Posted: Wed Oct 29, 2014 5:45 pm
by gugu000
Hi everyone, I'm new using Admiror Gallery and I think it's very cool. I've just one problem. When I try to visualize vertical images, or rectangular images of different aspect ratio, these appear distorted to fit the frame. It's possible to set Admiror Gallery to adapt to the eight and leave the empty spaces black or in a worst case to crop the images?
Thanks everyone for your help!

Re: Distorted image in gallery view

Posted: Thu Oct 30, 2014 11:25 am
by MVN
Can you post a link to your gallery, to see what exactly you mean?

Re: Distorted image in gallery view

Posted: Thu Oct 30, 2014 11:51 am
by gugu000
Thanks for your answer. The gallery is this one http://goo.gl/iXaJSN (i shortened the url) but you have to look for the first vertical image.
I would like the big image to be of the right aspect ratio and not to fit to the box. I hope to be clear, I'm here for every question.
Thanks again.

Re: Distorted image in gallery view

Posted: Thu Oct 30, 2014 12:58 pm
by Bifford
Ah, well, I don't know if there's a way to stop it doing that from within the slideshow code, but a very easy way to solve it is to load all vertical images into your favourite image editing software and change the "Canvas Size" (NOT resize) to add extra space right and left.

So if all your horizontal (landscape) images are 600 high x 800 wide, and your vertical (portrait) images are 800 high by 600 wide you would first resize the vertical images so that the height is 600 and the width 450. Then change the Canvas size to 600 high and 800 wide giving you a border down either side.

this then matches your horizontal images.

You can do this VERY quickly and easily if you know how to use scripts within your image editing program. And even if you don't it's a quick 2-step process anyway.

Re: Distorted image in gallery view

Posted: Thu Oct 30, 2014 1:43 pm
by gugu000
I understand.. :( This afternoon i'll try to change the visualization within the code, i think to implement an if statement to chose the wider dimension (landscape or portrait) and then apply this dimension to the photo or something like that :idea: . I'll keep you updated, so if I succeed doing that someone else could find it useful.
A good day and good work to everyone

Re: Distorted image in gallery view

Posted: Fri Oct 31, 2014 12:54 am
by Vasiljevski
You can try to edit CSS, check this post for details: http://www.vasiljevski.com/forum/viewto ... =444#p1801
But also you could remove this part ffrom template index.php:

Code: Select all

   AG_jQuery("#AG_'.$AG->getGalleryID().' div#photos .panel-content img").css({width:"'.$AG->params['frameWidth'].'px",height:"'.$AG->params['frameHeight'].'px"});
This will remove the autofit option.

Re: Distorted image in gallery view

Posted: Sun Nov 02, 2014 12:46 pm
by gugu000
Great thankyou very much, I solved the problem with the css solution. I added:

Code: Select all

.panel-content {
   text-align:center;
}

.panel-content img[style] {
   width:auto!important;
}
to the file: administrator/components/com_admirorgallery/templates/default/css/template.css
It just worked.
Thanks again