napolux
napolux

Reputation: 16074

Retina images in PHP

Let's suppose I'm uploading a 1600x1200px picture to a webserver and I want to "build" the retina version of the image itself.

In code:

$imageRetina = renameForRetina($originalImage);
$imageNormal = halfResize($originalImage);

Is ok to keep the original version as the "retina one" and an half-size version as the "non retina" or I should work on image resolution, dpi, etc... to achieve my goal and have a "retina" quality?

Upvotes: 0

Views: 483

Answers (1)

Saturn
Saturn

Reputation: 18149

Resizing (down, to get the non-retina) should be enough. At least for me with my iOS applications. Not sure what your case is for, but probably no one will notice.

Edit: According to your comment (you want to add the @2x suffix), it seems your purpose is indeed iOS development I guess. So yeah, it should be fine to resize it down - it works for me.

Upvotes: 2

Related Questions