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 Discussion / How do I create a thumbnail from a screenshot (within darkbasic) ?

Author
Message
miki
20
Years of Service
User Offline
Joined: 7th Jan 2005
Location:
Posted: 3rd Jun 2005 00:42
Hi,
I'm making a race game where the player can create his own track ...
How can I get darkbasic to create a thumbnail of his track, (200x150)... for veiwing at startup ...

thanks,
miki.

in the end
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Jun 2005 01:59
You could GET IMAGE, make it into a sprite, SCALE SPRITE, PASTE SPRITE and GET IMAGE again.

BatVink
waffle
22
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 3rd Jun 2005 12:42
BatVink is right. But there is a few more things you need to do.
Since your doing a custom track, you need to add in your own cheat code. Maybe if the user presses the "G" key, the camera switches to a straight down position located at the map center. Then, you draw a box on the screen to inform the user where the picture will be taken. Then, allow the user to move the camera up/down to get the map properly framed. You may also need to adjust the camera clipping range while in this mode. When the map is framed, the user presses the "H" key to save the target bitmap with the file named as "mapname.bmp". Pressing the "G" key again reverts to standard display mode. If you wish to display the map hud at this time, load the saved bitmap as a hud texture and so on ...

I use this method for doing my HUDs, except the cheat codes go in the commandline to prevent accidental use.
miki
20
Years of Service
User Offline
Joined: 7th Jan 2005
Location:
Posted: 5th Jun 2005 07:55
thanks to both of you .....

one problem down, a thousand to go.

regards,
miki.

in the end
kaymation
20
Years of Service
User Offline
Joined: 30th Mar 2005
Location: up, down, all around
Posted: 12th Jun 2005 07:18
How do you even take a screenshot in DB?

i owe all my wantingness to TBC at [href]www.homestarrunner.com[/href]
Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 12th Jun 2005 07:35
this way:


miki: you could also create a code that generates a previeuw pic.

please reply
kaymation
20
Years of Service
User Offline
Joined: 30th Mar 2005
Location: up, down, all around
Posted: 12th Jun 2005 10:36
wait could you kinda explain that? I mean i set it all up the way I want it then do that? Man I dont know anything.

i owe all my wantingness to TBC at [href]www.homestarrunner.com[/href]
Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 12th Jun 2005 22:46 Edited at: 12th Jun 2005 22:46
From the help files (It doen't hurt to press F1)
Quote: "
GET IMAGE
This command will copy a selected area of the current bitmap. You must specify an image number between 1 and 65535. Amongst other things, you can use this command to store sequences of image data and provide animations for sprites. When images are grabbed, they are stored in memory and do not require the bitmap from which the image was taken. The parameters should be specified using integer values.

The optional Texture Mode value is used to control the texture capabilities of the image. If you set the Texture Mode value to 1 you will copy the image directly into Video memory, rather than having the system automatically do it later on. If you set the Texture Mode to 2 you will ask that the image be compressed when used as a texture. Compressed textures take up less Video memory when used but requires special hardware on the card called Hardware Texture Compression.

It is recommended you don't use compressed textures when using the black transparency option on 3D objects that use the texture, as the performance hit is considerable.

SYNTAX
GET IMAGE Image Number, Left, Top, Right, Bottom
GET IMAGE Image Number, Left, Top, Right, Bottom, Texture Mode"


I always use paint to determine the Left, Top, Right, Bottom values

please reply
kaymation
20
Years of Service
User Offline
Joined: 30th Mar 2005
Location: up, down, all around
Posted: 13th Jun 2005 01:50
no,no,no,no,no, I mean like... did you ever see baggers signature/add

i owe all my wantingness to TBC at [href]www.homestarrunner.com[/href]
Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 13th Jun 2005 02:33
Baggers?

please reply
kaymation
20
Years of Service
User Offline
Joined: 30th Mar 2005
Location: up, down, all around
Posted: 15th Jun 2005 11:01
Yeah, he has a huge comersial for Jazz Jackrabbit 3D

i owe all my wantingness to TBC at [href]www.homestarrunner.com[/href]
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 16th Jun 2005 00:36
you could just use [shift]+[prnt scrn] and then pres [ctrl]+[v] in a paint program.

The happenings of tommorow are behind us now
Eddie B
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 16th Jun 2005 21:44
Right , I have an idea:

Get the screen how ever you do it . In dbpro get image,, then the screen wifth() ect etc ... The use sprite to turn it into a sprite..
Then you can scale it.

heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 17th Jun 2005 16:42
COPY BITMAP
This command will copy the contents of one bitmap into another bitmap providing the destination bitmap is not smaller than the first. The command requires at least a source and destination bitmap. You can optionally specify a source area to be copied from and a destination area to be copied to within each bitmap. If the size of the two areas differ, the source data will be rescaled.

SYNTAX:
COPY BITMAP From-Bitmap, To-Bitmap
COPY BITMAP From-Bitmap, Left, Top, Right, Bottom, To-Bitmap, Left, Top, Right, Bottom

Peace, the anti-Bush.
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 19th Jun 2005 07:48
Yep, copy bitmap or get image. Your choice.

Taking a screenshot in DarkBASIC:

Quote: "
`set up code, etc.

`Update screen
sync

get image 1,0,0,screen width()-1,screen height()-1
`Now there's a screenshot of the whole screen in image 1.
"


How's my typing? Phone 0800-GO-TO-HELL
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 27th Jun 2005 21:53
Im here wish my big comercial jazz ad !
These guys answered it already, my image came from a modeler render, the guy who made the first Jazz model made the pic and I edited it in PSP.

kaymation
20
Years of Service
User Offline
Joined: 30th Mar 2005
Location: up, down, all around
Posted: 20th Jul 2005 09:24 Edited at: 20th Jul 2005 09:26
he edited a picture in a playstation?
edit: sorry chris i didnt mean to insult you.

i owe all my wantingness to TBC at [href]http://
www.homestarrunner.com[/href]
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 30th Jul 2005 03:37
He means paint shop pro. ( i hope you knew that already and was just joking).

------------------------
Visit my website of Games!
http://dabip.stonerocket.net
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 30th Jul 2005 04:55 Edited at: 30th Jul 2005 04:57
You could use this command:
name$="screenshot.bmp"
save bitmap name$

Or something like that, check CodeBase for my entry (marked Screenshots).


---------
Vote for Excelsis on the Puzzle Game Compo.

__________________________________________
<<<<<Check out my sites>>>>>
www.rhettgames.tk | www.slayerbattletanks.tk

Login to post a reply

Server time is: 2025-05-22 14:03:18
Your offset time is: 2025-05-22 14:03:18