Problem with Image risolutions

Hello guys

When i start a new project (choosing the Sideway version of the simulator), the default width and height are 320 and 480… but when I create an img 480x320 it results too small…

Then I have to change the config.lua and i put

 width = 270, height = 480, scale = "letterBox", fps = 30,

In this way everything work but when i try to upload the images they result a little bit sketchy…

Can someone solve it?

Did you change portrait for landscape in build.settings?

Nono bro… I didn’t touched the Build.setting

Hi @BETLAB11,

Can you please post some code where you’re displaying one of the images that seems odd, when the w/h is set to 320x480?

Also, which device are you testing on? Or which Simulator “view”?

Thanks,

Brent

The device simulatr is an android one…

This is the screenshot : jsyl.png

The red img size is 320x480… The height match perfectly but the width is not enough!.. what to do??

Hi @BETLAB11,

Just because the config width and height are 320x480 doesn’t mean that a 320x480 image will fit on the screen for all devices. That Android Simulator is probably taller than 480, respectively, and since you’re using “letterbox” scale, the image will span to the horizontal sides, and that’s it.

Does this help clarify somewhat?

Brent

Just a few things to add on.  The config.lua is always written assuming a portrait device.  Your width should never be greater than your height.

Depending on your strategy to handle content areas that vary from device to device, they almost always require that your background be bigger than the defined content area.  So for instance, with a content area of 320x480 you want a background of 360x570.  Depending on the device, some of this will “bleed” off the screen.  You’re background can’t have important things in areas that will bleed off the screen.

Did you change portrait for landscape in build.settings?

Nono bro… I didn’t touched the Build.setting

Hi @BETLAB11,

Can you please post some code where you’re displaying one of the images that seems odd, when the w/h is set to 320x480?

Also, which device are you testing on? Or which Simulator “view”?

Thanks,

Brent

The device simulatr is an android one…

This is the screenshot : jsyl.png

The red img size is 320x480… The height match perfectly but the width is not enough!.. what to do??

Hi @BETLAB11,

Just because the config width and height are 320x480 doesn’t mean that a 320x480 image will fit on the screen for all devices. That Android Simulator is probably taller than 480, respectively, and since you’re using “letterbox” scale, the image will span to the horizontal sides, and that’s it.

Does this help clarify somewhat?

Brent

Just a few things to add on.  The config.lua is always written assuming a portrait device.  Your width should never be greater than your height.

Depending on your strategy to handle content areas that vary from device to device, they almost always require that your background be bigger than the defined content area.  So for instance, with a content area of 320x480 you want a background of 360x570.  Depending on the device, some of this will “bleed” off the screen.  You’re background can’t have important things in areas that will bleed off the screen.