Reputation: 4313
I'm putting some images into Codename One but they don't look nice. I'd like to ask some generic questions regarding using images with Codename One.
Say, if I have a splash screen which occupies the entire screen on portrait mode, what is the image size and resolution I should prepare the image file? That is, this is the big size and would fit on a large device without pixelation and automatically scales down on smaller devices (using Multi-images).
I guess once I get the advice on the image size and resolution, I can prepare images in their starting big size, and let it scale down proportionately to smaller devices.
Upvotes: 3
Views: 144
Reputation: 7483
Since there are many devices out there with different screen sizes and DPI/PPI, you can't keep up with the biggest size and resolution. For instance, Samsung Galaxy S7 edge has a screen resolution of 1440 x 2560px while iPhone 7 plus has a 1080 x 1920px...generating images of these sizes will increase your app size tremendously.
As a personal preference, I keep my original image resolution at a maximum of 800 x 1280px and I ignore Very low
, Low
, 560
, 2HD
and 4K
when I'm generating Multi-images.
HD
will be used for any screen size above it while Medium
is used for anything below it. Using this, I never noticed any pixelation on the real devices and I've tested on both devices I mentioned above.
Upvotes: 4