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

       Web browser: ---
            Bug ID: 55477
           Summary: MultimediaViewer should support hi-DPI ('Retina')
                    displays
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: MultimediaViewer
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: br...@wikimedia.org
                CC: fflo...@wikimedia.org, mtrac...@member.fsf.org
            Blocks: 32101
    Classification: Unclassified
   Mobile Platform: ---

(Jotting down some issues noted while testing, things that aren't directly
related to the commits.)

Currently the viewer doesn't have any handling for high-DPI/Retina displays --
the image loaded will be sized for 1x density only, and may appear blurry on
sharper displays.

Simplest way to handle this in near future would be something like:

* get the display density with $.devicePixelRatio() -- this will return a
number like 1, 1.5, 2, or another number depending on the display density
and/or browser zoom level. (This is a polyfill for the window.devicePixelRatio
property which adds support for IE; don't forget to include the 'jquery.hidpi'
module in your dependencies if using it.)

* multiply the target width and height by that ratio and round off to ints;
pass that pixel size into the imageinfo request when asking for a thumbnail.

* don't forget to use the _non-multiplied_ sizes in width/height attributes on
the <img>

-- 
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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to