For performance, is it better to use high PPI images or images with larger dimensions for retina devices? - iphone

For example:
Image 1:
414 x 736 pixels # 401 dpi = 244 kb
Image 2:
1242 x 2208 pixels # 96 dpi = 1.10 mb
It seems pretty clear that high res images are smaller in file size, but am I missing something?
These dimensions are based on the iphone 6+
http://www.paintcodeapp.com/news/iphone-6-screens-demystified

Related

Unity's Screen.width / Screen.height doesn't reflect my android device size

I'm using Galaxy22 Ultra so
on unity,
Debug.Log(Screen.width+"///????/"+Screen.height);
Debug.Log(Screen.currentResolution);
both says
width : 1080
height : 2316
which is not even reflect cellphone's ratio...
if width is really 1080pixel then height should be maybe 3 or 4 times bigger.
how can I get real pixel size of width and height
seems likely Galaxy S22 Ultra native resolution is 3088 x 1440. But the OS maybe reduce it to standard resolution 1080 width, this would be 75% of original size.
Thus 3088 x 1440 (75%) will be 2316 x 1080 correctly.
Screen.width // this only return your rendering screen width
Usually, some mobile will optimised the performance by reducing rendering result from native resolution.
And surely your phone screen ratio won't be 3:1 or 4:1. Normally they are between 16:9(or 1.7:1) to 21:9(or 2.3:1).

use ppi to get logical resolution

I am trying to emulate the Samsung Galaxy Tab S 10.5 , and I have no idea what the screen resolution is to create an emulator. This model seems to be left off any list I found.
Full Spec & Details http://www.gsmarena.com/samsung_galaxy_tab_s_10_5-6438.php
The screen has been given the specs:
2560 x 1600 pixels, 10.5 inches (~288 ppi pixel density)
If I use 2560 x 1600 pixels as the screen size, its obviously too big. How can I work out its Device pixel Ratio? Does the ppi have anything to do with it?
The Nexus 10 is 1280 x 800, but how can I get an exact for this or any device?
EDIT
Looking at the Nexus 10 (also made by samsung), it has the same 2560 x 1600 pixels, a Device pixel Ratio of 2, a slightly smaller screen, and a slightly bigger ppi of 300. So it would make sense this tab would also be Device pixel Ratio of 2. But is there a way to work out Device pixel Ratio from specs?

FB images resolution

I noticed a strange thing on Facebook.
I have uploaded 3840 X 2400 image to Facebook.When I downloaded the same image from Facebook, I got an image of 2048 X 1280(Compression ratio = 1.8) . Uploaded 2560 X 1600 and got 960 X 600(Compression ratio = 2.6).I uploaded 1440 X 1280 and got 960 X 854(Compression ratio = 1.5).Why are my images scaled? To what percentage, the image is scaled? Also, what is the option "High Quality"? What happens if we select that option? Can any one explain me? I went through GRAPH API but couldn't find any clue...

Confusion over #2x and Image Resolution

I have some image I got from the web. Let's say that the max size I can make it without pix elating is 500 x 500. So with that said, should I make the #2x version of it, simply the 500 x 500 version, and regular version (ie for non retina) 250 x 250? Just a little confused about sizing the image correctly for the right screen resolution and any help would be appreciated.
Yes what you said is correct.
Keep in mind though that once you put it on the device the #2x will display as 250x250 pts on a retina screen.
If the #2x version is 500 x 500 then it will be treated at load time as a 250 x 250 double-resolution image (scale = 2).

UIWebview can not display some large size image?

what's biggest size image can UIWebview handle?
the origin image size is: width 700 pixels, height 6900 pixels, And uiwebview display nothing.
iOS has the 3MB size limitation. the image size (width x height) must less than 3 * 1024*1024
I've discovered from some testing a limit on my html5 canvasses of 768*4096, or 3MB at 1 byte per pixel. The same resolution is enforced for images, as its not the original image size that matters, but the size of the bitmap that is rendered on the screen..