The 'upright' option should use a square bounding box
OpenPublic

Description

See https://www.mediawiki.org/wiki/Requests_for_comment/Square_bounding_boxes for context.

The "upright" option is currently misnamed: it doesn't do anything special for upright images, it just scales the default width-based thumbnail size.

It should use a square bounding box.


Version: 1.24rc
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=63903

bzimport added a project: MediaWiki-Parser.Via ConduitNov 22 2014, 3:22 AM
bzimport set Reference to bz63904.
cscott created this task.Via LegacyApr 14 2014, 3:02 PM
cscott added a comment.Via ConduitApr 14 2014, 3:18 PM

I am gathering statistics on how many image sizes would be affected by changing upright to use square bounding boxes, and optionally also changing the default scale factor to 1.0 at the same time (assuming the default scale factor was mostly used for 3:4 portrait aspect-ratio images). The statistics-gathering code can be found at https://github.com/cscott/wp-image-info

For frwiki, there are 1,242,985 references to non-commons images, of which 17,870 use the 'upright' specifier. If upright were changed to use a square bounding box, 1049 would change size by more than 5px if the default scale factor was left at 0.75, and 1053 would change size by more than 5px if the default scale factor was changed to 1.00.

On dewiki, there are 1,786,779 references to non-commons images, of which 38,624 use the 'upright' specifier. If upright were changed to use a square bounding box, 1963 would change size by more than 5px if the default scale factor was left at 0.75, and 1764 would change size by more than 5px if the default scale factor was changed to 1.00.

Statistics collection on enwiki is still ongoing.

Aklapper added a comment.Via ConduitMay 5 2014, 1:01 PM

(In reply to C. Scott Ananian from comment #1)

Statistics collection on enwiki is still ongoing.

Any news?

cscott added a comment.Via ConduitMay 14 2014, 12:28 AM

For enwiki, there are 4,949,488 references to non-commons images, of which 37,185 use the 'upright' specifier. If upright were changed to use a square bounding box, 1971 would change size by more than 5px if the default scale factor was left at 0.75, and 1866 would change size by more than 5px if the default scale factor was changed to 1.00.

So roughly 0.75% of the images on a wiki use upright, and 0.04% would change size if 'upright' used a square bounding box.

Given that the # of size changes are roughly comparable for the 0.75 and 1.00 default scale factor, I'd suggest that we should use the 1.00 scale factor, which will remove one more magical constant from wikitext semantics.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.