What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

This question cross-posted from Meta.AskDifferent by request of bmike ♦.

For users with the new MacBook Pro with retina display, or the latest iOS devices (or even other platforms with high-DPI screens), screenshots have their dimensions doubled. For example, if I take a screenshot of a window, this is what I get:

retina screenshot, not resized

As you can see, when the image is displayed normally, it's too big.

The best way to display these is to use

<img src="[url]" width="[half of image width]">

Which produces this:

On a retina display, this is rendered at native resolution; on a non-retina display, it's appropriately downscaled so that it remains the correct size.

Can we get a checkbox on the image upload dialog that does the hard work for us? This would make answering questions a lot easier without having to manually check the image width, divide by 2, and type in the HTML.

Something like this:

Or perhaps this, which would not divide by 2, but simply produce something of the form <img src="..." width="...">:

share|improve this question
I'd say once enough sites are seeing 2x uploads from Mac, iPad, iPhone to make this worth a developer's time - this would be an easy fix to reduce the amount of editing and reduce human error in typing <img src="[url]" width="[half of image width]"> especially from a mobile device. Until then it can sit here and on any site meta that wish to show votes of support and be ignored by Stack Exchange. – bmike Jan 2 '13 at 18:23
Note that the iDOT chunk stored in screenshots on (recent versions of?) OS X might contain details on the pixel density. Unfortunately I haven't found its specification yet, but it appears to be integer-only. Nevertheless it might be an indication that an uploaded image is HiDPI and should get downsized. – MvG yesterday

1 Answer 1

I think this approach is not optimal as it is limited to only one screen density. HDPI support should not be limited to the *2 pixel density of the retina devices. There are multiple densities already flooding the market like *1.5, *1.75...

A better approach for a proper HDPI support would probably be:

  • By default display only a checkbox to scale the image according to the density of the current display
  • Add a button to enable a finer density selection.
  • When the user choses to display more options, display a fine grained density selector (slider + text input).

Yet another aproach would be to read the DPI fields of the image and automatically scale using html width and height when markdown is used. If the user is not satisfied with this choice give him the option to not rescale accordingly to DPI. Something like adding ![enter image description here][2][ns] would do I guess.

And I really think this feature needs to be implemented now, while there are few HDPI users here, rather than later when we'll have too many HDPI screen captures disfiguring the posts and answers.

When the screen captures are too large they give a clunky aspect to the site. The damage is not only cosmetic as they introduce readability issues; they break the flow of tutorial-like answers and they scale down when they are too large to display in the window.

HDPI is getting more and more support in modern systems, even Windows 8 is getting there. And 2013 being the year intel will try to put more of emphasis on "rich displays" time is running out.

So this is truly the best time to implement this feature.

share|improve this answer
It seems like the better option is to work with the imgur team to see if something can be done to detect pixel density and re-render (images are already re-rendered on upload) to something closer to 72ppi? – jcolebrand Jan 4 '13 at 0:21
@jcolebrand But then we lose data for people who have high-DPI screens. Seems just as bad as or worse than the original problem. – jtbandes Jan 4 '13 at 2:20
@jcolebrand This would indeed rescale the screen captures. While this would "solve" the problem in most situations, details in screen captures which try to show defects or discrepancies happening on HDPI screens would be lost in the downscale. So this approach is definitely not the right one. – Coyote Jan 4 '13 at 7:49
Define please: If you're a graphics artist or someone seriously focused on HDPI, and it's well known that the (stack.??)imgur uploads downscale, wouldn't you host elsewhere? – jcolebrand Jan 4 '13 at 15:32
@jcolebrand: Whaaa? I'm sorry but I can't make much sense of your last comment. I'm not a native english speaker. – Coyote Jan 4 '13 at 17:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .