https://bugzilla.wikimedia.org/show_bug.cgi?id=30282

       Web browser: ---
             Bug #: 30282
           Summary: feature request: return aspect ratio of an image
           Product: Wikimedia
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: General/Unknown
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


It is common to use the multiple image template
(http://en.wikipedia.org/wiki/Template:Multiple_image) to post post a row of
thumbnails specified to be the same height.  The template needs to know the
width of each thumbnail in order to draw a box around them.  It has no way to
obtain the dimensions or aspect ratio of the original images.  Therefore the
template does not accept height as a parameter.  In order to obtain the desired
result, one must manually enter the dimensions of each image and desired height
into a formula that returns the width.

Example:
Instead of entering simply this:
height = 100

One must enter this:
width1 = {{#expr: (100 * 750 / 536) round 0}}
width2 = {{#expr: (100 * 320 / 438) round 0}}
width3 = {{#expr: (100 * 892 / 723) round 0}}
etc.

This is hackish and cumbersome and can mess up formatting if an image is
updated with a different aspect ratio.  If there was a way to obtain the
dimensions or aspect ratio of an image then the template could handle this.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to