Doubt about LoadImage

BlitzMax Forums/BlitzMax Beginners Area/Doubt about LoadImage

vinians(Posted 2010) [#1]
Hi guys!
Im using LoadImage(LoadBank('http::www.test.com/image.png')) to load a image successfully.
But reading BMax manual I read this:
LoadImage:TImage(Url:Object, flags=-1)....
Its seams that LoadImage() can read urls directly without using LoadBank(). But when I try to do this as manual says Im getting an error. Can someone explain why?
Thanks in advance!


markcw(Posted 2010) [#2]
Yes it's a bit misleading named 'url' but it's because you can use different protocols like http, incbin, etc. It's explained a bit in the intro for brl.stream in the docs.

Assari's 2D game tutorial covers it best...
http://www.2dgamecreators.com/tutorials/gameprogramming/images/T1_Images.html

Also see these topics...
load image from internet
Loading image from website
Max Documentation


Yan(Posted 2010) [#3]
LoadImage() expects a seekable stream* but a http stream obviously isn't seekable. Hence the need for 'conversion' via a bank.



*Yes, the docs *should* mention this.


GfK(Posted 2010) [#4]
Yes it's a bit misleading named 'url'
Its not misleading - its just that many people don't understan what a URL actually is. Its not a term which the majority of people ever hear/use beyond the scope of the internet.


vinians(Posted 2010) [#5]

LoadImage() expects a seekable stream* but a http stream obviously isn't seekable. Hence the need for 'conversion' via a bank.



*Yes, the docs *should* mention this.

Ian


humm.. I see, I understod now! But they should mention it on manual, its prevent a post like mine :D I love to figure out how the things *really* works!
Thanks!