all groups > dotnet compact framework > august 2006 >
You're in the

dotnet compact framework

group:

Two different argb values...


Two different argb values... Noble Bell
8/30/2006 5:41:02 PM
dotnet compact framework:
I have to different PPC's by two different manufacturers. Both are running
the same version of OS and both are PPC2003.

When I do the following:
1) I load the same image on both PPC displays
2) Get a pixel color
3) use the pixel.toargb() function

I get two different results. Why is this? Should they not be the same value?


------------------------------------------
Noble D. Bell
AgForest Partners, Inc.
Re: Two different argb values... Ilya Tumanov [MS]
8/30/2006 6:45:06 PM
It depends on a screen color depth. If you see some LSBs are set to zero,
you might have 16 bit video on one device and 12 bit video on another.

It also might be 5:5:5 vs. 5:6:5 format difference.


--
Best regards,


Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

[quoted text, click to view]

Re: Two different argb values... Noble Bell
8/30/2006 8:18:01 PM
Hmm...

Thats interesting. If that is the case then how would one ever take the argb
value of a pixel and look it up in a database table against a list of values
if the pixel argb value could be different on different hand helds?

What is the norm on ppc's for color depth nowadays? 16-bit? 32-bit?

nb

------------------------------------------
Noble D. Bell
AgForest Partners, Inc.



[quoted text, click to view]
Re: Two different argb values... Noble Bell
8/30/2006 10:36:01 PM

It is a colormap. What we are doing is that we have 4 states on a display
and the user can tap on any one of the 4 states and it will take them to
another screen that has a series of farm fields, the user again taps on a
selection until he gets the one that he wants to work with.

The only way that I could achieve the user being able to tap on any area in
the polygon and get the right image was to make a color map and overlay the
original image over the top of it.

In other words the user sees the states image but when the user taps the ppc
gets the location of where the user taps and the pixel color from the
underlying colormap of RGB colors. The RGB color is turned into an argb color
value that has references in a database table to tell the program what the
user clicked.

Kinda hard to explain but I think you might get the idea. I am very open to
an easier way to achieve this if anyone has one.

Thanks everyone for helping me. I really appreciate it.

------------------------------------------
Noble D. Bell
AgForest Partners, Inc.



[quoted text, click to view]
Re: Two different argb values... ctacke/
8/30/2006 11:24:38 PM
[quoted text, click to view]

I've got no idea why you'd want to look it up in a database, but you can
always strip the LSBs and do a lowest-common-denominator comparison.

[quoted text, click to view]

There is no "norm". 12 and 16 bit are the most common. It's unusual to see
more depth, as most displays of the size you're looking at don't support any
higher depth, so it's just a wast of memory and bus bandwidth.

-Chris

Re: Two different argb values... Paul G. Tobey [eMVP]
8/31/2006 7:56:53 AM
Wouldn't it make more sense to figure out where he tapped by looking
at...well, where he tapped? Rather than what color pixel he tapped on?

Paul T.

[quoted text, click to view]

Re: Two different argb values... Gavin
8/31/2006 8:37:02 AM
I think Noble means a color map like what game programmers sometimes use for
collision detection. I had a similar problem a while ago.

[quoted text, click to view]
AddThis Social Bookmark Button