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 / Save image command problem

Author
Message
Bjack55
13
Years of Service
User Offline
Joined: 25th Jul 2012
Location:
Posted: 2nd Dec 2012 21:40
Hi everyone,
I'm doing a football tattics program using dbpro and I use the "save image" command to save the tattic (which comprehends the football pitch 800x600). When I save the image it is scaled to a square. the command scales all the images when saved so it's not a "get image" problem or so on. What could I do to save my image with the original height and width ?
thanks
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Dec 2012 21:56
Assuming you're using get image to create the image, there is an additional flag you can set:

get image img , sx , sy , ex , ey , 1 <-- this here

Then, when you save the image, your dimensions will stay the same.

If this is not the case, then you can add an additional flag to the command save image:

save image filename$ , img , 5 <-- this here

TheComet

Bjack55
13
Years of Service
User Offline
Joined: 25th Jul 2012
Location:
Posted: 2nd Dec 2012 22:23
ok so in the get image I have to set the flag to 1 and in the save image to 5 ? thank you very much
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Dec 2012 00:14
One or the other will suffice.

TheComet

Login to post a reply

Server time is: 2026-07-07 09:28:08
Your offset time is: 2026-07-07 09:28:08