Load images from the web
by Phillip O'Shea · in Torque Game Builder · 08/12/2007 (2:53 pm) · 1 replies
Hi,
I trying to think of a solution to the subject title. Please let me know if the engine is already set up for this, but from what I have seen, it is not.
1. Creating a connection to the site (like using the same methods HTTPObjects/TCPObjects use),
2. Requesting the image,
3. Loading in each line into a file stream,
4. Saving the image as a temporary file,
5. Loading the file into a datablock,
6. Then when I am finished, delete the temporary file.
Sound reasonable?
I trying to think of a solution to the subject title. Please let me know if the engine is already set up for this, but from what I have seen, it is not.
1. Creating a connection to the site (like using the same methods HTTPObjects/TCPObjects use),
2. Requesting the image,
3. Loading in each line into a file stream,
4. Saving the image as a temporary file,
5. Loading the file into a datablock,
6. Then when I am finished, delete the temporary file.
Sound reasonable?
About the author
Head of Violent Tulip, a small independent software development company working in Wollongong, Australia. Go to http://www.violent-tulip.com/ to see our latest offerings.
Associate Phillip O'Shea
Violent Tulip
I have worked out that I can stream the data of the image fine, but when I write to the file, it removes empty (00 hex) characters, which is bad. Other than that, I can get exact binary duplicates of an image from the web.
Can anyone help?