forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: OmegaGOD on October 04, 2013, 11:37:03 pm

Title: Double Resolution for Retina enabled displays
Post by: OmegaGOD on October 04, 2013, 11:37:03 pm
I've been a long time CPG user and noticed recently that my photos in CPG look very grainy on Retina displays (iPads, iPhones, Macbook Pro, etc.)

The problem is that the retina displays have double pixel density. So an image that is 1024x768 native is upscaled to 2048x1536. What would be a great feature would be to have CPG correctly handle sizing for retina displays.

Here is what I mean. Let's say the native image size is 2048x1536. In the HTML images source:

<img src="./blah.jpg" width="1024" height="768">

The web browser for non-retina displays would auto resize the image blah.jpg down to 1024x768 and display it. For retina displays, the web browser automatically identifies the image as double density and display at the native 2048x1536. The image would be the same size on the screen as a non-retina display, but would have double the pixel density and be sharper and less grainy.

The only modifications are in the img tags themselves... to set the width and height to 50% of the native image size. I think this can be easily accomplished by having a checkbox in the setup that says "Retina enabled." Users would have to then upload images that are double the intended size.

Maybe I'll take a stab at this over the weekend :-)

Any thoughts?
Maybe I'll take a stab at this next week when the wife is away. :-)
Title: Re: Double Resolution for Retina enabled displays
Post by: Αndré on October 05, 2013, 02:03:42 pm
an image that is 1024x768 native is upscaled to 2048x1536
I don't own any Apple device, so I don't know how exactly they behave. But if they really upscale pictures by default, you should ask Apple to stop such nonsense. However, I'm not sure if it's possible at all to detect the pixel density of the visitor (without fail). Even if it's possible, there are still limitations in Coppermine, as you've set maximum picture dimensions for uploads. So I think what you're actually asking for is to display a downscaled version of pictures for people with a lower pixel density/resolution, so the pictures don't exceed the visitors screen. Something like a full-screen mod.