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.

DarkBASIC Professional Discussion / Some questions about Make Memblock from Image...

Author
Message
enderleit
19
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 23rd Feb 2011 21:03
I was thinking about making some improved ImageBlock stuff, so you could create an image block by adding images(not loading) and they would be added to a memblock. So all Images that you added would be in the same memblock and could then be saved as one file...

However I have a few Questions about this...

1. In the image memblock the DEPTH value is the color depth (16/32bit), but does this mean that I should read/write words if it is 16bit, and dwords if it is 32bit?

2. Do I need to add support for 8bit images? Do they even exist anymore?

So for example:


IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Feb 2011 23:14
1. Yes, but you may find it easier to make your memblock images 32 bit.
2. No.

One problem that you may have is that I believe that DBPro will base its depth on the current program mode, so if it's running in 16 bit mode, all images will be loaded as 16 bit even if the source data is 32 bit, and vice-versa. I'd investigate that first before writing any code for your main program.

Login to post a reply

Server time is: 2026-07-17 14:00:04
Your offset time is: 2026-07-17 14:00:04