Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / dbPoint

Author
Message
Klas Wullt
14
Years of Service
User Offline
Joined: 7th Dec 2009
Location: sweden
Posted: 7th Sep 2011 16:36
Hello.

I want to load and analyse a bitmap.
To read the colour of a coordinate and translate it to water or un-passable terrain.

But I dont get the dbPoint to work.
It returns zero all the time.

Can someone submit example code?
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Sep 2011 18:52
Use memblocks.
dbMakeMemblockFromImage(mb,img);
from that you can look at the color of the image.
int pos=12+(y*width+x)*4;
DWORD Color=dbMemblockDword(mb,pos);

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-10-02 19:18:18
Your offset time is: 2024-10-02 19:18:18