Graphic drawing and saving image as a file.

new BookmarkLockedFalling
mmiscool
Full Member
***

mmiscool Avatar

Send me a message if you want to help with a WEB OS project
Posts: 106

Post by mmiscool on Sept 20, 2010 20:43:20 GMT -5

I am trying to save a graphic that i have drawn with rb to a path on the disk.

Is it possible to save or export a graphic similar to the way in lb?

the lb way is
print #handle, "getbmp bmpName x y width height"
This command will make a bitmap copied from the graphics window at x, y and using width and height. It resides in memory. This bitmap can be drawn using the DRAWBMP command, just as a bitmap loaded with LOADBMP. It is also possible to get a Windows handle to this bitmap with the HBMP() function.
Check out the code wiki at http://smbisoft.com[br]The code wiki allows for multiple users to work on the same project at the same time in just basic.[br][br]SMBISoft ____888-LAN-Zoli _____ 888-526-9654
StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
mmiscool
Full Member
***

mmiscool Avatar

Send me a message if you want to help with a WEB OS project
Posts: 106

Post by mmiscool on Sept 21, 2010 20:32:52 GMT -5

I have circumvented the problem by making a lb program that can be run from the shell command.

Since liberty basic graphic drawing commands are all strings printed to the graphics object all it had to do was read in the graphics command file, run the graphics instructions and save to the bmp name listed a the last line in the graphics script file.

I can post code if any one wants it.

-Mike
Check out the code wiki at http://smbisoft.com[br]The code wiki allows for multiple users to work on the same project at the same time in just basic.[br][br]SMBISoft ____888-LAN-Zoli _____ 888-526-9654
Gordon
New Member
*

Gordon Avatar

Posts: 22

Post by Gordon on Jul 3, 2018 8:14:08 GMT -5

mmiscool Avatar
I have circumvented the problem by making a lb program that can be run from the shell command.

Since liberty basic graphic drawing commands are all strings printed to the graphics object all it had to do was read in the graphics command file, run the graphics instructions and save to the bmp name listed a the last line in the graphics script file.

I can post code if any one wants it.

-Mike


I'm interested

Gordon
Gordon[br]www.libertybasic.nl/index1