Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Square thumbnails with cropped images

Square thumbnails with cropped images 1 year 9 months ago #24190

  • stevent
  • stevent's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 105
  • Thank you received: 24
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->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.

Square thumbnails with cropped images 1 year 9 months ago #24192

  • stevent
  • stevent's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 105
  • Thank you received: 24
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.

Square thumbnails with cropped images 1 year 9 months ago #24193

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 3039
  • Karma: 45
  • Thank you received: 310
yes, indeed. But finding updates of subprograms and communicate them could and should be the task of every user. Thanks! Do you find others?
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.3.0dev 2.0M and specials with Joomla! 3.9.3 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR

Please Log in or Create an account to join the conversation.

Square thumbnails with cropped images 1 year 9 months ago #24194

  • stevent
  • stevent's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 105
  • Thank you received: 24
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.

Please Log in or Create an account to join the conversation.

Last edit: by stevent.

Square thumbnails with cropped images 1 year 9 months ago #24195

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 3039
  • Karma: 45
  • Thank you received: 310
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.
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.3.0dev 2.0M and specials with Joomla! 3.9.3 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR

Please Log in or Create an account to join the conversation.

Square thumbnails with cropped images 1 year 9 months ago #24198

  • stevent
  • stevent's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 105
  • Thank you received: 24
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
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Time to create page: 0.204 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......