iOS Question [solved] A bit confused about resize and variants

igodese

Member
Licensed User
Hi all. I'm a bit confused about screenshot resize and variants. At this moment, I have just one variant in my designer: 1136x600 (my target device is an iPhone5).

I asked how to obtain screenshots for all devices and resolutions and received this answer:
You can use this tool, created by Ilan, to create the screenshots: https://www.b4x.com/android/forum/threads/b4i-screenshots-resizer.46911/#content

I downloaded the tool (easy and very useful) and tried to get all the screenshots. Okay, but...
If I have a square button at 1136x600 resolution, it becomes a rectangle in 1334x750, 'cause the 1136x600 has a x/y factor of 1.8933 (periodic) and 1334x750 has 1.77866 (periodic).

Now, the question is:
are the resized screenshots the exact image of my App (tailored for 1136x600) running on different resolution devices ?

If it's true:
is just one variant, in my designer, enough to publish on Apple Store, accepting that any view will be "distorted" depending upon the device running the App ?

If I create new variants in my designer, moving and rearranging the views in order to have square buttons at any resolution, it's evident that I can't use the Resize-tool from Ilan 'cause a simple resize wouldn't match the new arrangement.

Thanks in advance for any help.
 
Last edited:

igodese

Member
Licensed User
Oops.
Thank you.

I was on Apple Tech Specs page for the iPhone 5 on the Internet ( https://support.apple.com/kb/SP655?locale=en_US ) , looking for screen size and resolution and I found: 4" Retina display ; 1136-by-640-pixel resolution at 326 ppi

Similarly, I looked on other iPhone pages for screen sizes and resolutions and I found:

iPhone 3GS (at this moment, no more present on Apple site) = 3.5" / 480 x 320
iPhone 4 and 4S = 3.5" / 960 x 640
iPhone 5 , 5S and SE = 4" / 1136 x 640
iPhone 6 = 4.7" / 1334 x 750
iPhone 6+ = 5.5" / 1920 x 1080

Now, when I take a screenshot from a running App on my iPhone5, I get a png file with dimensions 1136 x 640, that's the resolution of the screen.

On Apple sites, I haven't found informations about "normalized layout" and "scale factor" ; can you provide a link to a table with such informations ?

Also, using the program B4i-Resizer, found on this forum, I got some strange resolutions, converting my original 1136x640 screenshots.

The resulting images have this format:

3.5" -> 960 x 600 (note: 600, not 640)
4" -> 1136 x 600 (note: 600, not 640)
4.7" -> 1334 x 750
5.5" -> 2208 x 1242 (expected: 1920 x 1080)

ipad -> 1024 x 768 (not checked on Apple site)
iPadPro -> 2732 x 2048 (not checked on Apple site)

Would you, please, help me to understand what is true and what false ?
Those strange values are driving me mad...

Thank you in advance.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
On Apple sites, I haven't found informations about "normalized layout" and "scale factor" ; can you provide a link to a table with such informations ?
Scaling is more relevant in Android as it is hidden from the developer in iOS.
You can see the reported width and height with this code:
B4X:
Log(GetDeviceLayoutValues.Width & " x " & GetDeviceLayoutValues.Height)
Log("Non normalized scale (which is mostly not important): " & GetDeviceLayoutValues.NonnormalizedScale)
The non normalized scale will be 2. Which means that there are 160 * 2 dots per inch. Practically from a developer point of view your device is 320x568 (scale = 1). This is equivalent to 640x1136 (scale = 2).

Use the default variant. There is no need to change it.

I'm not sure which results you get with the resizer. I don't remember encountering any issue when I uploaded the images to iTunes connect.
 
Upvote 0

igodese

Member
Licensed User
Use the default variant. There is no need to change it.
Thank you, that's an exhaustive information.

I'm not sure which results you get with the resizer. I don't remember encountering any issue when I uploaded the images to iTunes connect.
I used the program giving as input a screenshot taken with power+home buttons. The original is 1136 x 640, the converted images (in "converted" folder) have the size I posted in post #3. Anyway, I usually use the good old (also free) PaintShop Pro4, that has resize feature and PNG transparency remove option.
Obviously, the B4iResizer is faster and easier, but I can't understand why the results have sizes different from the expected ones.
May be I shall post a question on the author's main thread.

Thank you for your support, Erel.
 
Upvote 0
Top