Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Double Resolution for Retina enabled displays  (Read 5391 times)

0 Members and 1 Guest are viewing this topic.

OmegaGOD

  • Supporter
  • Coppermine frequent poster
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 346
  • I approve.
Double Resolution for Retina enabled displays
« 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. :-)
Logged
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Double Resolution for Retina enabled displays
« Reply #1 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.