LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-17-2006, 02:38 PM   #1
myrmidon
Member
 
Registered: May 2005
Distribution: redhat 9 , fedora 5,6,7,DSL,Debian 3, mandrake 9.2 , knoppix 3.8, red hat 7.3
Posts: 38

Rep: Reputation: 15
SDL open a remote imate


Hello everyone im developing a small apllication wich will load an image from an ipa based camera. i can access the image from my browser like http://root:admin@10.0.0.30/still.jpg

Now the thing is i need to access this image from SDL but the code below does not do the job:



image = IMG_Load("http://root:admin@10.0.0.30/still.jpg");

is there a possible solution for this problem ?


Thanks
 
Old 10-18-2006, 07:25 AM   #2
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
afaik there is no functionality in sdl to transfer files. there is a networking lib, but its not aimed at file transfer. you are probably going to need to look into either an external program like wget, or find a library that allows you to download files. is that what curl does?
 
Old 10-18-2006, 11:47 AM   #3
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Get the image data using curl or something like xhi suggested, then get an SDL_RWops structure using SDL_RWFromMem. Then use the IMG_Load_RW or IMG_Load*_RW (Where * is JPG, PNG, etc..).

Refrences:
http://jonatkins.org/SDL_image/SDL_image.html
http://www.kekkai.org/roger/sdl/rwops/rwops.html
 
Old 10-18-2006, 12:35 PM   #4
myrmidon
Member
 
Registered: May 2005
Distribution: redhat 9 , fedora 5,6,7,DSL,Debian 3, mandrake 9.2 , knoppix 3.8, red hat 7.3
Posts: 38

Original Poster
Rep: Reputation: 15
thanx for reply, it helped .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SDL is installed, included and linked, but will not compile SDL code mansizerooster Programming 10 05-31-2006 04:18 AM
Sourcecompiling Problem...The sdl-config script installed by SDL could not be found. deepclutch Debian 1 12-15-2005 12:15 PM
Open ports on a remote machine doctorwebbox Linux - Networking 2 05-23-2005 05:10 AM
Trying to program an SDL application but cannot find the SDL.h file:SuSE 9.2&KDevelop pujolasdf Linux - Newbie 4 03-13-2005 07:50 AM
how to open port 25 for remote machines abd_bela Linux - Security 4 01-30-2003 08:01 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration