Color.colorToHSV bug

by Keith Wiley » Wed, 01 Apr 2009 07:44:45 GMT


Sponsored Links
 I believe there is a bug in Android's implementation of
Color.colorToHSV().  If you pass it fully desaturated color, it
assigns all three HSV components to the same value, that value being
the "value" component of the color.  While hue is arguably arbitrary
in such an instance could be assigned any value at random, saturation
should unambiguously be assigned zero in such a case...at least,
that's how I see it.  I have circumvented this bug in my code by
testing the individual bytes of the input color against each other to
detect desaturation, and when it occurs, explicitly overwriting the
resulting HSV color's saturation component with zero, but this bug,
assuming I'm interpreting it correctly as a bug, should be fixed.

BTW, is there an official channel to file such a bug report?  I don't
see anything jumping out at me when I explore developer.android.com,
but maybe I missed it.

--~--~---------~--~----~------------~-------~--~----~



Color.colorToHSV bug

by thesquib » Wed, 01 Apr 2009 09:03:41 GMT


 Bugs and issues can be added and tracked at 
 http://code.google.com/p/android/issues/list 




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Screen/Activity orientation

Situation:
 I set my activity to be in landscape mode. In this activity, I move a
box along the x direction, which is along the longer side of the phone
due to being in landscape. When the activity is first started,
everything works great--the x axis in my code corresponds to the
expected x direction in landscape.

Problem:  if in the middle of running it, I go into the dialer app by
pressing the call button, and then going back to my app, the box still
moves in the "x direction" but now perpendicular to the supposed
landscape x direction. I suppose the dialer's portrait mode got passed
onto my activity even though the orientation is set to landscape in
the manifest.

Attempts: I have tried numerous ways to remedy this but to no avail. I
tried re-initialzing all my views, calling setContentView upon
Restart. I also tried to get my orientation by calling
getResources().getConfiguration().orientation. The result indicates
"landscape" although the x axis now is perpendicular to before.

Please help! How do you deal with orientation change????
--~--~---------~--~----~------------~-------~--~----~

2. Send SMS Message

There are lots of post talking about sending SMS messages. But my
question is not answered there.

So, I can send sms messages using my app, but after the message is
sent, I can't find them in the "Messaging" app's outbox, you know,
like it list all incoming and outgoing messages. What I want to
accomplish is that whatever app user used to send text message, it
should show up in the "Messaging" app.

Any ideas on how to solve this?

I used smsManager.SendTextMessage call to send text message.





--~--~---------~--~----~------------~-------~--~----~

3. Store prepopulated sqlite database in an app

4. Settings not saving

5. How to start Android emulator 1.5?

6. Question: How to guestimate the available bitmap memory on a device

7. Post your ad for free + jobs opportunities