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 / Quick question about making images larger than screen resolution with DBPro

Author
Message
Bluespark
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location:
Posted: 6th Aug 2011 02:11
In order to make a large maze image using only black and white, and save it to png, how would this be done?

I'm not asking for the maze generating algorithm, I'm already experienced with that. I'm asking for once I generated the maze, how would I save it as a 5000x5000 resolution png image?
wickedly kick it
19
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 6th Aug 2011 03:24
5000x5000? Only thing i can think of is save it in pieces using get image and merge em.

Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 6th Aug 2011 03:54
memblock image -> make image from memblock -> save image?


Why does blue text appear every time you are near?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Aug 2011 05:58
What neuro said. You could also look into using ImageKit

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 6th Aug 2011 06:25
If it's just black and white, I would build it with sprites made from just a black square and a white square. You could make the map in a text file filled with 0s and 1s. The 1s representing white squares.

WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 6th Aug 2011 15:27 Edited at: 6th Aug 2011 15:29
As far as I know the only restriction on image sizes is only for use as textures on 3d objects. So having an image 5000 x 5000 shouldn't be a problem.

If you're using it to create a maze then granted, you would have to read it in chunks to save on memory usage and for speed. I'm sure the image size could even go much bigger than that.

EDIT: even a 4 colour bitmap could store a bit more information than a 2 colour one. ie, wall, floor, zones and pick ups.

Warning! May contain Nuts!
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Aug 2011 17:20
Yupp WLGfx bet me too it. It is no problem to "create bitmap 1,5000,5000" in DB for instance. I have often used a larger bitmap than the screen size to get easy scrolling effects. It probably depends on your video card as to your exact limits, but a decent desktop should cope with 8192x8192 res if you really need it that big. If you find you cannot make a file that big it will be a video memory issue. Netbooks for instance are unlikely to support that large an image.
So you should be able to generate the maze and simply save the image...

http://s6.bitefight.org/c.php?uid=103081

Login to post a reply

Server time is: 2026-07-10 20:58:28
Your offset time is: 2026-07-10 20:58:28