1、修改config.lua的設定值:scale = "letterbox"
2、main.lua的程式如下:
local sceenX = display.contentWidth - (display.screenOriginX * 2)
local screenY = display.contentHeight - (display.screenOriginY * 2)
local image = display.newImageRect("image_bg.png", xMax-xMin, yMax-yMin)
image.x = centerX
image.y = centerY