Image xScale performing differently on device than simulator

Hi,

     I just got my game onto a phone for the first time (iPhone 6+). I have an issue with several images not displaying the same scale as in the Corona Simulator (for iPhone 6+). Attached are three screenshots from the simulator and 2 from my device. The two similar images are from the simulator and device and the third image illustrates a more severe example. The comparison case only features a slight error but the code is easier to review. The image in the comparison screenshots is a background image of a menu scene using composer. The resolution of the image is 1920x1080 (menu_back.png). The issue is best seen in the lower right corner where the bg image aligns with the menu button image in the simulator case but does not in the device case (general scaling can clearly be observed as well). Are there any issues with non-integer resolutions after scaling in iOS (like image scaled to 100.2 x 190.7)? I suspect that is not it because I have tried modifying the xScale and yScale (in this case to 0.975) to ensure integer values and still see the same issue. I would appreciate any suggestions as this affects several images. I can manually adjust the scaling so the device images display properly but I would like to understand why this is occuring. Thank you. Below is the relevant code from that 1) scene file and 2) my config.lua file: 

local composer = require( "composer" ) local scene = composer.newScene() -- local forward references should go here local city\_set = {} city\_set.cX = display.contentWidth/2 ; city\_set.cY = display.contentHeight\*.5 local menu\_menu\_group = display.newGroup( ) local rectblack = display.newRect(menu\_menu\_group,city\_set.cX, city\_set.cY, 2000,2000 ) rectblack:setFillColor( 0 ) local menu\_group = display.newGroup( ) menu\_group.menu\_back\_img = display.newImage(menu\_menu\_group,"images\_col/menu/menu\_back.png", city\_set.cX, city\_set.cY) menu\_group.menu\_back\_img.xScale = .97; menu\_group.menu\_back\_img.yScale = .97; -- menu\_group.menu\_back\_img.xScale = 1; menu\_group.menu\_back\_img.yScale = 1; menu\_group.menu\_back\_img:toFront()

application = { content = { width = 800\*1.3, --(1040) height = 1200\*1.3, --(1560) scale = "letterBox", fps = 30, }, }

Hi @TLC_dev,

When I look at the screenshots, it doesn’t appear that the scale is wrong between Simulator and device… that is, I don’t see any stretching or squishing. Instead, it appears that the position is not what you expect. If true, then it’s probably just a matter of how you position it and how “letterbox” scale works. I can help you understand these things if you need…

Brent

Hi @TLC_dev,

When I look at the screenshots, it doesn’t appear that the scale is wrong between Simulator and device… that is, I don’t see any stretching or squishing. Instead, it appears that the position is not what you expect. If true, then it’s probably just a matter of how you position it and how “letterbox” scale works. I can help you understand these things if you need…

Brent