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.

Newcomers DBPro Corner / need help on a screenshot with compression or scale

Author
Message
PeterLewis
21
Years of Service
User Offline
Joined: 27th Sep 2003
Location: South Africa
Posted: 4th Nov 2003 02:08
I am trying to copy a 1024x768 screen for a recall of past games screenshot

I have managed to do this but the file size is 3mb

I am looking for a way to either scale it down to +- 40% or save as a jpg.

I have tried to convert the image to a sprite and used the scale command and placed the sprite off screen but when I go to use the get image command it tells me that the co-ords are out of range

I have also tried to save as a jpg file but it tells me that it is illegal image type.

please help

thanks
Beavis
21
Years of Service
User Offline
Joined: 15th May 2003
Location: Czech Republic
Posted: 6th Nov 2003 18:27
How about PrintScreen key and insert it by CTRL+V into graphic app where you can save it in jpg.

--------
Beavis
http://www.progress-studio.com
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 8th Nov 2003 09:02
Beavis has excellent idea. I started thinking though, are you wanting to do a screenshot feature for a game (like in Red Alert 2)? There might not be a way around the high file size, I know that RA2's screenshots were really big and beefy.

Juv

Juvenile Industries
Current Project: The First Room (FPS)
Side Projects: SHIPWRECK, the boss's school project
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 8th Nov 2003 20:27 Edited at: 8th Nov 2003 20:41
I think he wants it scaled and saved in dbpro code not from an extenal app.

Try something this (the get image parimeters may be mixed up)
get image 1,left,top,width,height,1
create bitmap 1,width,height
sprite 1,0,0,1
stretch sprite or size sprite to the required size
get image 1,left,top,sprite width(1),sprite height(1),1
delete bitmap 1
save image filename$,1

You could try saving as a .jpg file but I think most of the save image formats are broken.

I have no idea how well that code will work. Bear in mind that the sprite commands are for ingame and need to be as fast as possible so the scale sprite command may use a method that is fast but won't look as good as resizeing in a paint package.

p166mmx @ 233 : 256mb : sb 128pci : sis onboard
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 8th Nov 2003 20:42
I also have some code that uses memblocks to half the image by disgarding every other line.

Only works in 32bit and might be slower/worse quality than using scale sprite.

see code button.

p166mmx @ 233 : 256mb : sb 128pci : sis onboard

Login to post a reply

Server time is: 2024-11-25 16:44:01
Your offset time is: 2024-11-25 16:44:01