Page 1 of 1

Masonry Effect Image Cropping

Posted: 30 Sep 2014, 16:59
by GGGolf
Hi Jan!

I have a question about the masonry effect in Joomla 3.

Is it posibble for the thumbnails to be always displayed in a ration similar to the original image? If it's a portait, the thumbnail would be portrait and the same for landscape? The landscape pictures are cropped very awkwardly and randomly and I would like to set it properly.

Thank you!

Catherine

Re: Masonry Effect Image Cropping

Posted: 30 Sep 2014, 23:29
by Jan
Hi, for now there is an easy rule, which says - if the image is landscape - display the image which is 2x wider and when it is portrait - display the image which is 2x higher. This easy rule works for displaying double sizes only - there is no such option for cropping as this function is really complicated and such needs to be customized for specific features (e.g. to not crop human body, to crop empty places on the photo, etc. :idea: )

Jan

Re: Masonry Effect Image Cropping

Posted: 02 Oct 2014, 16:00
by GGGolf
Hi Jan,

Please see the attached image. It's a print screen from how the gallery displays. If you look at it, the Koala Photo and the baby photo on the bottom are lanscape pictures, but displayed as portraits. The only portait pictures are the two at the bottom right. Event the flowers on top right are displayed as portrait when they are actually landscapes. And this changes everytime I releoad the page. Is this the way it shoul be or have I done something wrong?

Image

Thanks again,

Catherine

Re: Masonry Effect Image Cropping

Posted: 04 Oct 2014, 11:48
by Jan
Hi, do you mean MOSAIC EFFECT (categories view)
https://www.phoca.cz/joomla3demo/

or DIFFERENT THUMBNAIL HEIGHT (category view):
https://www.phoca.cz/joomla3demo/category/6-cities

Only in category view there is such option

Jan

Re: Masonry Effect Image Cropping

Posted: 05 Jan 2015, 17:07
by GGGolf
Hi Jan,

I mean for the different thumbnails height. I want the thumbnails of the gallery to be of different heights, but the landscape pictures are displayed randomly in portrait. They should simply be displayed in the format they were taken and disposed accordingly in metro style...

Is that possible?

Thanks,

Re: Masonry Effect Image Cropping

Posted: 12 Jan 2015, 00:15
by Jan
Hi, for this, I think, you need to customize directly the code:

administrator\components\com_phocagallery\libraries\phocagallery\image\imagefront.php
components\com_phocagallery\views\categories\tmpl\default.php
components\com_phocagallery\views\category\tmpl\default_images.php


Jan

Re: Masonry Effect Image Cropping

Posted: 06 Feb 2016, 13:04
by proudbird
In file "components\com_phocagallery\views\category\tmpl\default_images.php" try to change block:

Code: Select all

$m2 = mt_rand(0,1);
if ($m2 == 1) {
$iFormat = 'medium1';
}
to

Code: Select all

$m2 = mt_rand(0,1);
if ($m2 == 1) {
$iFormat = 'medium';
}