Loading Remote Sprites

Previous topic - Next topic

spicypixel

I saw a code snippet/function on here months ago which I think Gernot wrote to load remote images. For some reason I just can't find it now, can anyone shed any light on this, or if I was dreaming :)
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

hardyx

#1
I don't saw this code, but you can make it using NEWWEBGET() pointing to the remote file in a web server and save in a local folder. Then you can use LOADSPRITE to load the local image.

Code (glbasic) Select
name$ = "image.png"
IF NETWEBGET ("www.myserver.com", "/images/"+name$, 80, name$) <> 0
  LOADSPRITE name$, 0
ENDIF

spicypixel

Thanks for the reply I've done this to save to an external folder for usage on iPhone as I can't save to the MEDIA folder. I will post my code because there are some discrepancies whereby SETCURRENTDIR doesn't work as it should as if it forgets where the MEDIA folder is when you set it back so it might make things easier for others. If purely for the directory (bug?) issue.

That aside I have it working now anyway and should have updated the topic really *my bad*
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

hardyx

In the iPhone you can't save data in the current directory (app folder), there is a separated folder for files. You must to use the path returned in PLATFORMINFO$("DOCUMENTS").

spicypixel

Quote from: hardyx on 2012-Sep-17
In the iPhone you can't save data in the current directory (app folder), there is a separated folder for files. You must to use the path returned in PLATFORMINFO$("DOCUMENTS").

Yes I know that I've already done this like I mentioned above, there are also other issues regarding DIRs I'll post when I am able.
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Kitty Hello

Or platforminfo$("temp")