Last modified: 2007-03-25 00:39:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11409, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9409 - Image frame width in units other than pixels
Image frame width in units other than pixels
Status: RESOLVED DUPLICATE of bug 7048
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-24 07:14 UTC by Eugene Pivovarov
Modified: 2007-03-25 00:39 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Eugene Pivovarov 2007-03-24 07:14:50 UTC
Most of Wikipedia articles explicitly set the sizes of the thumb images (instead of relying on 
user preferences). Since presently the image size can only be given in pixels, the articles are 
optimized for a particular screen resolution (typically 1024x768) and look very different at 
other resolutions. Therefore, it is highly desired to have the possibility to specify the width 
of the image frame in non-pixel CSS length units: in, cm, mm, pc, pt, em or ex. For example:

<nowiki>[[Image:Picture.jpg|thumb|2in|Caption text]]</nowiki>

Here is how the non-pixel width could be processed by the engine. First, it generates the 
image with the number of pixels corresponding to the provided width at the resolution 
specified in user preferences or by default -- say, 90 dpi. Thus, in the example above it 
would render an image 180px wide by default. Second, the server returns an XHTML with the 
img tag that contains no width or height attributes and instead contains only a style 
attribute that specifies the required width of the image:

<nowiki><img src="Picture.jpg" style="width: 2in;"/></nowiki>

Thus, at higher screen resolutions the browser will scale up the image so that it will always 
have 90 dpi.
Comment 1 Eugene Pivovarov 2007-03-24 07:17:18 UTC
Please ignore nowiki tags above; I just was not sure how the bug reports are displayed.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-03-25 00:39:15 UTC

*** This bug has been marked as a duplicate of 7048 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links