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 / How to read and write pixels a bitmap dbLockPixels()...?

Author
Message
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 20th Apr 2011 23:27
How to read and write pixels a bitmap dbLockPixels()... ?
Please help.
DeadTomGC
14
Years of Service
User Offline
Joined: 11th Aug 2010
Location: LU
Posted: 24th Apr 2011 22:28
For speed I would recommend using dbLockPixels and then writing or reading all the pixels using dbDot or dbPoint respectively and then using dbUnlockPixels.

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 27th Apr 2011 02:33
You could use dbMakeMemblockFromImage() and then do the data manipulation, then dbMakeImageFromMemblock().

The fastest code is the code never written.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Apr 2011 03:36
There's also dbGetBackBufferPtr() and the other commands that go with for direct bitmap access. You will need dbLockBackBuffer() first though.

I'm not sure if GDK allows you to do this for bitmaps though which would be handy...

Warning! May contain Nuts!
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 27th Apr 2011 06:50
I've had trouble with all the bitmap stuff in DGDK/VC++.... They seem to work fine for me in dbPro. I think bitmaps are considered obsolete in DGDK.

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-10-02 17:30:39
Your offset time is: 2024-10-02 17:30:39