Liberty BASIC Community Forum
« getbmp depending on the screen-size ? »

Welcome Guest. Please Login or Register.
Sep 21st, 2017, 7:57pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: getbmp depending on the screen-size ?  (Read 223 times)
Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 125
xx getbmp depending on the screen-size ?
« Thread started on: Jul 22nd, 2016, 11:27am »

[save]
#zeichnen.2, "als Bild speichern"
if DisplayWidth <= 1280 and DisplayHeight <= 1024 then #zeichnen.1, "getbmp zeichnung 5 5 1280 1024"
if DisplayWidth > 1280 and DisplayHeight > 1024 then #zeichnen.1, "getbmp zeichnung 5 5 2250 1200"
bmpsave "zeichnung" , "Zeichnung.bmp"
goto [input]


Hello 24 hours programmers ,

yes , this code works.

Depending on the screen resolution here a bitmap of
a graphicdraw is saved.
One for normal , one for HD resolution.

Does anybody know a alternative code for GET the picture depending on the screen.

This does not work :
#zeichnen.1, "getbmp zeichnung 5 5 DisplayWidth DisplayHeight"

Have not tried 5 5 ;x; ;y; for variables instead of the word commands above.

Dont know if it is possible to define a variable first and then include it in that code such like this :

WindowWidth = DisplayWidth : WindowWidth = x
WindowHeight = DisplayHeight : Windowheight = y

And then put x and y in that code above in getbmp !

And when its possible , in such kind of syntax?

Perhaps : #zeichnen.1, "getbmp " ; zeichnung ;5 ;5 ;x ;y"


Altogether :

You have a drawing on screen on any PC no matter
what resolution. The graphic window FULL Screensize.
To save the BMP in this PC resolution is the problem.
It is recommended to take the original size or only
a bit of the picture is seen.

Or in other words , your graphic application is always
full screen size on any PC , that is easy to program ,
but to get the graphics in that size als bmp and save it?


Or on another viewpoint ,
your graphics is always on maximum screen resolution
depending on the PC with DisplayWidth and DisplayHeight command for graphics window.

Example:
WindowWidth = DisplayWidth
WindowHeight = DisplayHeight
graphicbox #paint.1, 35, 20, DisplayWidth, DisplayHeight
open "main window" for window as #paint

Now make a saving of the complete graphicsbox/draw.

No matter if with getbmp or as bmp fileformat.

A real "SCREENSHOT" of that thing.



See you on planet LB

Zabo


« Last Edit: Jul 22nd, 2016, 1:45pm by Zabo » User IP Logged

robmcal
Senior Member
ImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 399
xx Re: getbmp depending on the screen-size ?
« Reply #1 on: Jul 22nd, 2016, 2:04pm »

Variables need to be outside of quotes and you need to preserve the spacing. This should work.
Code:
#zeichnen.1, "getbmp zeichnung 5 5 ";DisplayWidth;" ";DisplayHeight 
User IP Logged

Definition of an Upgrade: Take old bugs out, put new ones in.
Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 125
xx Re: getbmp depending on the screen-size ?
« Reply #2 on: Jul 22nd, 2016, 3:18pm »

Thank you Equalizer Mc Call ,

yes that works.

And i really want to take this
if DisplayWidth <= 800 and DisplayHeight <= 600 then #zeichnen.1, "getbmp zeichnung 5 5 800 600"
if DisplayWidth > 800 and DisplayHeight > 600 then a1 = 1
if DisplayWidth <= 1280 and DisplayHeight <= 1024 and a1 = 1 then #zeichnen.1, "getbmp zeichnung 5 5 1280 1024"
if DisplayWidth > 1280 and DisplayHeight > 1024 then #zeichnen.1, "getbmp zeichnung 5 5 2250 1200"


Unbelievable.

Good to know such members like you.
Professional advice.

Remember "Theese times are NOT over"
As Mcall said to the police chief.
New York City.

Zabo
User IP Logged

cundo
Guru
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 626
xx Re: getbmp depending on the screen-size ?
« Reply #3 on: Jul 23rd, 2016, 12:54pm »

ahh laugh, I did a search, it is about the fictional character laugh I don't know about the TV series, but the film with Denzel Washington had a lot of action. Yes very off-topic post, sorry. lipsrsealed
User IP Logged

cundo
Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 125
xx Re: getbmp depending on the screen-size ?
« Reply #4 on: Jul 23rd, 2016, 1:04pm »

smiley Edward Woodward
« Last Edit: Jul 23rd, 2016, 6:16pm by Zabo » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls