Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist > Bug Reports
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.

Problem of Getpixel on PocketPC 2000 and PocketPC 2003

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-20-2007, 02:48 AM
Junior Member
 
Join Date: Jul 2007
Location: Hong Kong
Posts: 49
Send a message via MSN to hung Send a message via Yahoo to hung Send a message via Skype™ to hung
Default Problem of Getpixel on PocketPC 2000 and PocketPC 2003

I use the following code to test Getpixel in Pocket PC2000/2003/WM5/WM6.

The getpixel returns same values of the cRed/cGreen/cBlue constants in WM5 and WM6.

But in PocketPC 2000 and PocketPC 2003, pointing on
red circle returns -524288
green circle returns -16744448
blue cirlce returns - 16776968

Any walk around resolve it?

Sub Globals
'Declare the global variables here.

End Sub

Sub App_Start
Form1.Show
label1.Text = "cRed = " & cRed & " RGB(255,0,0)" & Rgb(255,0,0)
label1.Text = label1.Text & crlf & "cGreen = " & cGreen & " RGB(0,255,0)" & Rgb(0, 255,0)
label1.Text = label1.Text & crlf & "cBlue = " & cBlue & " RGB(0,0,255)" & Rgb(0,0,255)

form1.Circle(0, 120, 50, cRed, F)
form1.Circle(100, 120, 50, cGreen, F)
form1.Circle(180, 120, 50, cBlue, F)

End Sub


Sub Form1_MouseMove (x,y)
label2.Text = form1.GetPixel(x, y)
End Sub
__________________
Yours,

Dopod D810 WM6 GPS HSDPA 3G Wifi Bluetooth
Reply With Quote
  #2 (permalink)  
Old 08-20-2007, 12:25 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

It has been brought up in another thread, and is suposed to be related to the maximum screen colors possible on the device...

WM5 and WM6 devices support up to 65k colors, but older devices may not support as many colors thus giving diferent relation colors for the R,G,B factors, being the only twoo "standart" colors the black (0,0,0) and the white (255,255,255) or what ever maximum values are alowed...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #3 (permalink)  
Old 08-20-2007, 12:42 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

What you can do (at runtime) is to check the color of a known pixel and store it in a variable. Now compare other pixel's colors to this variable.
Reply With Quote
  #4 (permalink)  
Old 08-21-2007, 02:46 AM
Junior Member
 
Join Date: Jul 2007
Location: Hong Kong
Posts: 49
Send a message via MSN to hung Send a message via Yahoo to hung Send a message via Skype™ to hung
Default

Quote:
Originally Posted by Erel View Post
What you can do (at runtime) is to check the color of a known pixel and store it in a variable. Now compare other pixel's colors to this variable.
Yes. That works.

I use a variable to keep the color immediately after the graph is draw, then use the variable to check against the getpixel.
__________________
Yours,

Dopod D810 WM6 GPS HSDPA 3G Wifi Bluetooth
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get telephone number of your own Pocketpc cotralis Questions (Windows Mobile) 2 09-09-2008 05:49 PM
how to connect SQLlite on pocketpc thaidelphi Questions (Windows Mobile) 1 08-05-2008 06:01 AM
Redirecting pocketpc audio to bluetooth hedset maxbaranov Share Your Creations 2 05-15-2008 02:18 AM
PocketPc phone or smartphone distribution kshetarpal Questions (Windows Mobile) 3 11-26-2007 12:09 PM
How to identify each pocketpc differently hung Questions (Windows Mobile) 3 07-24-2007 11:05 AM


All times are GMT. The time now is 04:50 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0