|
Post by turbov21 on Oct 16, 2007 17:34:24 GMT -5
This may be old school to the LB coders out there, but I thought it was a pretty nifty bit of Run BASIC code.
pic$ = httpget$("http://farm2.static.flickr.com/1393/1424227742_c3ec24ed5a_t.jpg")
open "c:\rbp\junktest\1.jpg" for binary as #1 print #1, pic$ close #1
html "<img src=""/junktest/1.jpg"" />"
Now, if there's just a way to incorporate JPEG's into images rendered with RB, I could create a collage generator.
|
|
|
Post by billw on Oct 16, 2007 18:02:40 GMT -5
Neat! If only LOADIMAGE was implemented....
|
|
|
Post by carlgundel on Oct 16, 2007 18:42:47 GMT -5
Try this.
-Carl
pic$ = httpget$("http://farm2.static.flickr.com/1393/1424227742_c3ec24ed5a_t.jpg")
open "c:\rbp\junktest\1.jpg" for binary as #1 print #1, pic$ close #1
loadimage "cat", "junktest\1.jpg" graphic #cat, 100, 100 #cat drawimage("cat",0,0) #cat color("red") #cat size(3) #cat line(0,0,100,100) render #cat
|
|
|
Post by turbov21 on Oct 16, 2007 19:06:45 GMT -5
OOOOH, MAAAAAN!
brainy1$ = "http://farm2.static.flickr.com/1133/1224807262_07ccac64ae_s.jpg" brainy2$ = "http://farm2.static.flickr.com/1178/1188347423_573d789a0c_s.jpg"
pica$ = httpget$(brainy1$)
open "c:\rbp\junktest\1.jpg" for binary as #1 print #1, pica$ close #1
picb$ = httpget$(brainy2$)
open "c:\rbp\junktest\2.jpg" for binary as #2 print #2, picb$ close #2
loadimage "b1", "junktest\1.jpg" loadimage "b2", "junktest\2.jpg" graphic #brainiac, 150, 100 #brainiac drawimage("b1",0,0) #brainiac drawimage("b2",75,25) #brainiac color("green") #brainiac size(3) #brainiac line(0,0,150,0) #brainiac line(150,0,150,100) #brainiac line(150,100,0,100) #brainiac line(0,100,0,0) render #brainiac
|
|
|
Post by Alyce on Oct 16, 2007 19:12:56 GMT -5
Try this. -Carl #cat drawimage("cat",0,0)
Hey! How did I miss that? I asked for exactly that command back in the "low hanging fruit" thread and you said you'd consider it, but HTML IMG tags worked fine. Very nice!
|
|
|
Post by carlgundel on Oct 16, 2007 21:05:58 GMT -5
Try this. -Carl #cat drawimage("cat",0,0)
Hey! How did I miss that? I asked for exactly that command back in the "low hanging fruit" thread and you said you'd consider it, but HTML IMG tags worked fine. Very nice! Sorry about that. I had actually quite forgotten that I had implemented it. -Carl
|
|