Any API to analyze image color ranges?

Hi, 

I want to put some images behind some text in my scrollView. Problem is that the images come from internet at runtime and can be darker or lighter looking compositions. If the image is darker and my text color is black then nothing shows. If its a lighter looking image and I happen to use white as text color again nothing shows. 

I would like to be able to analyze the image quickly and see if it is generally a darker looking image or lighter one. I would then choose the appropriate text color to contrast well with the image. 

Is there anything in Corona SDK that will help me? Thanks for your help. 

Regards,

Kerem

I am thinking of something like ColorThief - http://lokeshdhakar.com/color-thief/ . Would be great to have this capability as a plugin perhaps.

Corona SDK has no way to read any pixel information.

Still could be done through a native plugin perhaps? Or how about graphics 2.0? Anyways, not a critical item by any means. I was just wondering… Would much rather have all the widget bugs fixed… :slight_smile:

not the best way to handle your problem by far BUT maybe add a change color button and let the user tap it to change to a diff. color

just a thought

Yup. That can always be an option. Not to worry. This is really a cream on top of the cake type need. Its not critical. 

Yes, you should be able to do it with Enterprise.

I hope things like this will emerge from the Plugin Market once it gets established. 

Is there any indication that we will get any kind of getPixel functionality in upcoming versions of Corona? This seems like such a basic feature for a game engine that I have no idea how this isn’t in the top priority.

I am thinking of something like ColorThief - http://lokeshdhakar.com/color-thief/ . Would be great to have this capability as a plugin perhaps.

Corona SDK has no way to read any pixel information.

Still could be done through a native plugin perhaps? Or how about graphics 2.0? Anyways, not a critical item by any means. I was just wondering… Would much rather have all the widget bugs fixed… :slight_smile:

not the best way to handle your problem by far BUT maybe add a change color button and let the user tap it to change to a diff. color

just a thought

Yup. That can always be an option. Not to worry. This is really a cream on top of the cake type need. Its not critical. 

Yes, you should be able to do it with Enterprise.

I hope things like this will emerge from the Plugin Market once it gets established. 

Is there any indication that we will get any kind of getPixel functionality in upcoming versions of Corona? This seems like such a basic feature for a game engine that I have no idea how this isn’t in the top priority.