Thank you so much Tom for the reply. However, 1) I am more concerned about the device and not much about the simulator. It would be nice if it behaved like the device though, and 2) something is still not right. Please read the following from http://docs.coronalabs.com/api/library/display/save.html:
_ "NOTE: When dynamic content scaling is enabled, display.save() saves the image in the device’s native resolution. For instance, if this method is used to save a 100 x 200 pixel display object, it will be saved as a 100 x 200 image on iPhone3 but it will be a 200 x 400 image on an iPhone4 (which would have the same content dimensions but more actual pixels). This is assuming that the config.lua file specifies the content width/height as 320x480 respectively."_
According to the above, 100 px would be 100px on iphone3, 200 on iphone4, and so on (given that 320x480 width/height and letterbox in config.lua does not change)… = size / contentScale. But that’s not what we see in our examples above (on device). Please test the code I submitted in bug report or given above to see what it does.
About rounding: It’s hard to get 3 or more pixels added to the result by rounding alone, unless it’s been done more than once or being rounded first and then multiplied with a big number (in one of the tests above it changed 40px to 43)?
Please tell us if we are overlooking something here or better how does corona internally do the conversion math? Any details and specifics here would be a great help.