display.colorSample broke on iPhone 3 Simulator Mac !?!

Hi,

is it possible that the function display.colorSampleis broke on the iphone 3 simulator on mac??

It works fine on all other simulators,

but when i start the iphone 3 simulator i only get r,g,b = 0  (black) for any color i pick on the screen

is this a back in the simulator and does it work on a real iphone 3 device?

if its just a bug in the simulator its ok, but if not, please let me know !!

thanks

chris

Same for “Galaxy tab” simulator

Same for “Galaxy tab” simulator

It happens on many devices, and seems to be related to content size in relation to device size. I’ve just submitted a bug report and simple repro steps.

Please post your bug case ID # back here for reference.

Thanks

Rob

No problem - thanks:

Case 40909: display.colorSample() reporting black pixels

I reviewed the bug case and it does seem to return black pixels in the one case where the device/simulator skin is a lower resolution than what you have the virtual device set too (config.lua). I don’t consider this a bug because it’s not a valid use case. Let me explain.

Corona was written with the idea that you would target the lowest resolution device and scale up to higher resolution devices. That is why we have display.newImageRect and the support for @2X, @3X, etc. images. The test case submitted with the display.colorSample bug forces the content scaling in the wrong direction.

If you write your code this way you will run into a number of problems. First display.newImage will most likely scale large images incorrectly on Mac and iOS. Second, you will be loading very large images on low resolution devices (taking additional time and resources on a possibly low end device). Third, you will lose pixels when the high resolution images are scaled down to fix a low resolution screen (some pixels will be thrown out to fit the lower resolution display).

We added display.newImageRect to handle scaling up to high resolution devices, yet still support low resolution devices. Our widget library takes advantage of that for any graphics it uses. The intent was to set the parameters in config.lua for the lowest resolution device you plan to support and add higher resolutions images that can be automatically selected for the higher resolution devices.

I see - thanks for your help.

It happens on many devices, and seems to be related to content size in relation to device size. I’ve just submitted a bug report and simple repro steps.

Please post your bug case ID # back here for reference.

Thanks

Rob

No problem - thanks:

Case 40909: display.colorSample() reporting black pixels

I reviewed the bug case and it does seem to return black pixels in the one case where the device/simulator skin is a lower resolution than what you have the virtual device set too (config.lua). I don’t consider this a bug because it’s not a valid use case. Let me explain.

Corona was written with the idea that you would target the lowest resolution device and scale up to higher resolution devices. That is why we have display.newImageRect and the support for @2X, @3X, etc. images. The test case submitted with the display.colorSample bug forces the content scaling in the wrong direction.

If you write your code this way you will run into a number of problems. First display.newImage will most likely scale large images incorrectly on Mac and iOS. Second, you will be loading very large images on low resolution devices (taking additional time and resources on a possibly low end device). Third, you will lose pixels when the high resolution images are scaled down to fix a low resolution screen (some pixels will be thrown out to fit the lower resolution display).

We added display.newImageRect to handle scaling up to high resolution devices, yet still support low resolution devices. Our widget library takes advantage of that for any graphics it uses. The intent was to set the parameters in config.lua for the lowest resolution device you plan to support and add higher resolutions images that can be automatically selected for the higher resolution devices.

I see - thanks for your help.