Item8393: Thumbnails of non-square images not centred

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: ImageGalleryPlugin
Branches:
Reported By: Foswiki:Main.PaulHarvey
Waiting For:
Last Change By: MichaelDaum
You can actually see the problem in the ImageGalleryPlugin system topic demo - the mountain's thumbnail is centred fine in the vertical (smallest) axis, but takes the left-most edge of the picture in the horizontal axis.

Expected behaviour - options:
  1. generate thumbnails in the same aspect ratio as their respective source images
  2. generate square thumbnails over the centre of non-square images.

If it's up to me I'd take the latter approach, if there are no objections.

Assuming that nobody depends on the existing behaviour.

Set to WaitingFor MichaelDaum as this is his plugin.

-- PaulHarvey - 20 Jan 2010

Why do you think it is better to use the center of a non-square image instead of the upper left corner?

-- MichaelDaum - 20 Jan 2010

Most images are framed such that the region of interest is in the middle of the shot, not left (or right, or...).

If you disagree, then how aboutan extra option?

Most users don't care, Eg. it is not so bad on the mountain scene. But on high aspect ratio pictures where the subject is contained in the middle - Eg. insect, flower - it is a very noticeable artifact and the thumbnail is less useful.

If you think this is a useful enhancement, (new option or change existing behaviour) I can attach a diff to this topic for your consideration.

-- PaulHarvey - 20 Jan 2010

That would be gr8

-- MichaelDaum - 20 Jan 2010

Have a look at these thumbnails from a random collection of movies.

MovieThumbnails.jpeg

As far as I can see they all do quite fine showing the upper left corner of a non-square image. Sure, they are special in a way. All I want to illustrate is that certain types of images definitely do fine with an upper left crop.

Btw. the next JQueryPlugin will come with the jquery-masonry plugin that allows you to render image galleries like the following where you don't need to square crop all images to layout them on the page. Masonry will arrange them nicely even though they have different height.

MovieThumbnails1.jpeg

-- MichaelDaum - 21 Jan 2010

Certainly, I have no doubt that a great many images look fine with top-left crop. But those pictures would also look good centred.

The new version of JQuery looks great... So... Would you rather the masonry approach, and/or, create a new option for centred crop?

-- PaulHarvey - 21 Jan 2010

If there's a need to further customize the crop area, then there's no reason not to implement it.

-- MichaelDaum - 21 Jan 2010

Sadly I have more urgent things on my plate and I guess Michael does too. Set to new/enhancement

-- PaulHarvey - 30 Aug 2010

I'd consider PaulHarvey's option No. 1 – generate thumbnails in the same aspect ratio as their respective source images – a vast improvement over cropping. Implementing the masonry approach would make it even better. Among other things, we're using ImageGalleryPlugin to display illustrations for publishing projects. In such a use case, cropping forces users to click through a gallery for relevant information they could as well have gotten from thumbnails.

For now I've manually butchered the Core.pm to not crop thumbnails. It would be great if this were somehow made optional, like setting an argument crop="on|off".

-- HolstenerLiesel - 19 Oct 2010

No actions. Closing.

-- MichaelDaum - 27 Jul 2017
 

ItemTemplate edit

Summary Thumbnails of non-square images not centred
ReportedBy Foswiki:Main.PaulHarvey
Codebase
SVN Range
AppliesTo Extension
Component ImageGalleryPlugin
Priority Enhancement
CurrentState Closed
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
I Attachment Action Size Date Who Comment
MovieThumbnails.jpegjpeg MovieThumbnails.jpeg manage 151 K 21 Jan 2010 - 00:15 MichaelDaum  
MovieThumbnails1.jpegjpeg MovieThumbnails1.jpeg manage 200 K 21 Jan 2010 - 00:44 MichaelDaum  
Topic revision: r10 - 27 Jul 2017, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy