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 / DBPro Saving images

Author
Message
Wildfire
15
Years of Service
User Offline
Joined: 11th Dec 2010
Location: Arkansas
Posted: 19th Apr 2012 02:37
can DBPro save images into a single file like it can with text? If so, how?
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 19th Apr 2012 12:43
Either paste them all next to each other on a bitmap and use GRAB IMAGE to create a single image or create a memblock and write the contents of each image to the memblock.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 19th Apr 2012 20:04
you can pack them into one file, then unpack when needed
Wildfire
15
Years of Service
User Offline
Joined: 11th Dec 2010
Location: Arkansas
Posted: 21st Apr 2012 08:47
how do I go about packing or storing them in a memblock? I'm attempting to make a file safe of sorts.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 21st Apr 2012 15:08
There's two commands: MAKE MEMBLOCK FROM IMAGE and MAKE MEMBLOCK FROM BITMAP that could be used for that. I suppose setting up a function to add a load of memblocks together in one big one and then saving it out would work. The only problem with that is, the images will not be compressed and the file rather large. Another trick is to have images stored in a zip or rar file. I did a simple plugin for extracting files from these compressed formats with password protection and I also believe there's another zip plugin floating around somewhere too.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Wildfire
15
Years of Service
User Offline
Joined: 11th Dec 2010
Location: Arkansas
Posted: 23rd Apr 2012 06:58
how do you make DBPro access a zip file?
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 23rd Apr 2012 15:27
I posted a rar and zip plugin on this forum post sometime ago: http://forum.thegamecreators.com/?m=forum_view&t=191086&b=42

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Login to post a reply

Server time is: 2026-07-10 20:49:13
Your offset time is: 2026-07-10 20:49:13