|
Post by turbov21 on Nov 9, 2007 22:07:10 GMT -5
I know the following code is wrong, but what do I do to save a Graphic out to a file?
loadimage "b1", "c:\rbp\public\junktest\1.jpg" graphic #brainiac, 100, 100 #brainiac fill("green") #brainiac drawimage("b1",0,0)
open "C:\rbp\public\junktest\3.jpg" for binary as #1 print #1, #brainiac close #1
|
|
|
Post by Alyce on Nov 10, 2007 6:48:03 GMT -5
I know the following code is wrong, but what do I do to save a Graphic out to a file? loadimage "b1", "c:\rbp\public\junktest\1.jpg" graphic #brainiac, 100, 100 #brainiac fill("green") #brainiac drawimage("b1",0,0)
open "C:\rbp\public\junktest\3.jpg" for binary as #1 print #1, #brainiac close #1 Liberty BASIC has a bmpsave command, but RB does not. Another way... LB allows you to obtain the color of a pixel with API calls, and with some complicated coding, you can write out a file header and color table in binary. (I've done it, and so have others... but it's complicated.) I don't see a way to save a bitmap in RB. Perhaps if you tell us why you need to do this, we can suggest an alternative.
|
|
|
Post by turbov21 on Nov 10, 2007 14:46:43 GMT -5
Perhaps if you tell us why you need to do this, we can suggest an alternative. I was just curious if such a function existed.
|
|