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 / The dbGetImageData function

Author
Message
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 24th Apr 2006 13:19
I need to have this clarified, but this function only seems to work if the Lock argument is set to true. Also, because Locking is set to true, is there a particular function that I MUST call in order to unlock it again... i.e. am I supposed to call the dbUnlockImage function, or does it not matter.

Paul.


Home of the Cartography Shop - DarkBASIC Professional map importer
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 24th Apr 2006 13:28
.. And to add to that, although I now get a valid width/height/depth etc, the two arguments (LPSTR* pData, DWORD* dwDataSize) return odd data. dwDataSize returns 1 and pData points to sh!te data. Any one shed any light?

Cheers!

Paul.


Home of the Cartography Shop - DarkBASIC Professional map importer
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Apr 2006 15:56
Does pData point to the raw bytes of the image?

I guess that the best thing to do is to create a 1 pixel 32 bit image of a known colour ( rgb(1,2,3)? ) and see what you get out of it.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 24th Apr 2006 16:02
Yeah, that's a good point. It was the size thing that threw me though. And if I pre-initialize the pData with something before calling the function, it still points to the original data rather than being re-assigned to the new data via the function call.

It's as if the function only returns the size and depth, but ignores the pointer address to assign.

Paul.


Home of the Cartography Shop - DarkBASIC Professional map importer

Login to post a reply

Server time is: 2024-11-19 06:40:21
Your offset time is: 2024-11-19 06:40:21