Admiror Joomla! Community
http://www.vasiljevski.com/forum/

SOLVED - Distorted image in gallery view
http://www.vasiljevski.com/forum/viewtopic.php?f=38&t=1396
Page 1 of 1

Author:  gugu000 [ Wed Oct 29, 2014 5:45 pm ]
Post subject:  SOLVED - Distorted image in gallery view

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!

Author:  MVN [ Thu Oct 30, 2014 11:25 am ]
Post subject:  Re: Distorted image in gallery view

Can you post a link to your gallery, to see what exactly you mean?

Author:  gugu000 [ Thu Oct 30, 2014 11:51 am ]
Post subject:  Re: Distorted image in gallery view

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.

Author:  Bifford [ Thu Oct 30, 2014 12:58 pm ]
Post subject:  Re: Distorted image in gallery view

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.

Author:  gugu000 [ Thu Oct 30, 2014 1:43 pm ]
Post subject:  Re: Distorted image in gallery view

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

Author:  Vasiljevski [ Fri Oct 31, 2014 12:54 am ]
Post subject:  Re: Distorted image in gallery view

You can try to edit CSS, check this post for details: viewtopic.php?f=19&t=444#p1801
But also you could remove this part ffrom template index.php:
Code:
   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.

Author:  gugu000 [ Sun Nov 02, 2014 12:46 pm ]
Post subject:  Re: Distorted image in gallery view

Great thankyou very much, I solved the problem with the css solution. I added:
Code:
.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

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/