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 .NET / I really need to be able to set the Bitmap Format of my GDK.Net project.

Author
Message
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 5th Nov 2011 22:34
In Dark Basic Pro, there is the set bitmap format command, but I'm certain that is from the DBP update after the one GDK.Net is based on.

I can do it with "normal" C# bitmaps, using bitmap(x,y,pixelFormat), but sadly the same doesn't work for a GDK.Net bitmap.

Any ideas how I can work around this?

Thanks in advance.

Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Nov 2011 04:19
It depends what you want to do with the GDK bitmap. I too would like to use [set bitmap format], but I don't think such a function exists in the library for .NET.

A assume that in some cases, creating a bitmap using the .NET framework then saving it to a png to be loaded back into the GDK via the LoadBitmap command should do the trick. But if you needed something to work more quickly, then, unless the format function was made available, memblocks bitmaps & memblock images are your only friends.

=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 6th Nov 2011 12:34
@Chris Tate:
Thanks, I didn't think of trying that that way. Basically what I want to be able to do is grab some images from the bitmap with proper alpha transparency intact.

I fear tho, that memory blocks are the way forward if I want to do this properly.

Thanks again

Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 6th Nov 2011 13:07 Edited at: 6th Nov 2011 13:09
Cool. You probably know how to use them, but if do not; there is a guide for this on my website:



aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 6th Nov 2011 16:55
I too have found png files work best for alpha transparency.

Russell B. Davis/aerostudios

Login to post a reply

Server time is: 2024-04-24 20:34:16
Your offset time is: 2024-04-24 20:34:16