help to better help you:
Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!
Square thumbnails with cropped images
Square thumbnails with cropped images
7 years 3 months ago
I would like to have my list view of events consistent for each event. So I would like to have all the thumbs in the same aspect ratio, in my case this would be a square image.
The settings in JEM let me set a max width and height, but this leaves the aspect ratio of the image the same as the original, with the longest side set to the max width or height.
I dug into the Zebra image class (com_jem/classes/Zebra_Image.php) and found that you cat set the preserve aspect ratio to false. Line 728:
This does create a square thumbnail, but the image is distorted, so it fits within the box. I would like to see the image cropped, not shrunk. Any idea how I can achieve this?
Note: I'm hacking core code here. I suggest creating a setting in the admin that gives you the ability to choose between crop or original aspect ratio.
The settings in JEM let me set a max width and height, but this leaves the aspect ratio of the image the same as the original, with the longest side set to the max width or height.
I dug into the Zebra image class (com_jem/classes/Zebra_Image.php) and found that you cat set the preserve aspect ratio to false. Line 728:
Code:
$this->preserve_aspect_ratio = false;
This does create a square thumbnail, but the image is distorted, so it fits within the box. I would like to see the image cropped, not shrunk. Any idea how I can achieve this?
Note: I'm hacking core code here. I suggest creating a setting in the admin that gives you the ability to choose between crop or original aspect ratio.
Please Log in or Create an account to join the conversation.
Re: Square thumbnails with cropped images
7 years 3 months ago
Just curious: the latest version of JEM uses the 2.2.3 Zebra Image library, dated juli 2013. Shouldn't this be updated to the latest version 2.2.6 (may 2017)?
The following user(s) said Thank You: jojo12
Please Log in or Create an account to join the conversation.
Re: Square thumbnails with cropped images
7 years 3 months ago
yes, indeed. But finding updates of subprograms and communicate them could and should be the task of every user. Thanks! Do you find others?
Please Log in or Create an account to join the conversation.
Re: Square thumbnails with cropped images
7 years 3 months ago - 7 years 3 months ago
I'm not sure what you mean. If a component makes use of a third party library within their own package, the developer of the component should be aware of updates of the used libraries, not the enduser. For two reasons: the end user has no idea what libraries are used and if there's a security update on a third party library, this should be fixed in the component a.s.a.p.
Last edit: 7 years 3 months ago by stevent.
Please Log in or Create an account to join the conversation.
Re: Square thumbnails with cropped images
7 years 3 months ago
Theoretically I agree. But EVENTLIST-JEM had different developers, all with limited capacities and interests. I think each one made what he was capable to do. But I would say noone knows all of the great and big JEM project. So we need all hints who are found.
Please Log in or Create an account to join the conversation.
Re: Square thumbnails with cropped images
7 years 3 months ago
I know you developers are doing your best, but I think there should be a list of all the external libraries used, and someone should check regularly on updates.
There's one other library I could find: the icalcreator.class which is outdated as well.
Version used: 2.20
Current version: 2.23.20
github.com/iCalcreator/iCalcreator
There's one other library I could find: the icalcreator.class which is outdated as well.
Version used: 2.20
Current version: 2.23.20
github.com/iCalcreator/iCalcreator
The following user(s) said Thank You: jojo12
Please Log in or Create an account to join the conversation.
Time to create page: 0.506 seconds