Remote Bitmap

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Remote Bitmap // Scriptorium

1  |  

Post by Délé // Apr 16, 2007, 10:57am

Délé
Total Posts: 1374
pic
I'm pretty sure I saw this or at least heard about it a while back. I want to create a bitmap output on a script that grabs the image from a remote server. I tried some things like below but can't figure it out.


function OnComputeOutputs(params)

{


var Bitmap = System.CreateDO('Common Data Package/Bitmap Data');


Bitmap = GetFile("http://www.website.com/image.jpg");


params.ConValue('Bitmap') = Bitmap;

}


Does anybody know how to get a remote bitmap file into a bitmap output? In the end I'm trying to get an image from a website to be a texture for an object. Should be easy, I just can't figure it out.


Thanks

Post by trueBlue // Apr 16, 2007, 5:38pm

trueBlue
Total Posts: 1761
pic
Have you tried the HTML Control?

Post by Délé // Apr 16, 2007, 11:59pm

Délé
Total Posts: 1374
pic
Thanks trueBlue. Yeah, I've gotten the image to show up on the node using the HTML control, but I need to assign it into a bitmap output so that I can link it into a texture for an object. I'm sure it's something simple, but playing the guessing game can be rather hard. I figured if anyone here already had an idea of how to do that it would save a lot of time. :)

Post by stan // Apr 17, 2007, 4:16am

stan
Total Posts: 1240
pic
hi Dele, have you tried this
HRESULT IRdBitmapDisp::LoadFromFile ( BSTR [I]FileName )

Post by stan // Apr 19, 2007, 4:16pm

stan
Total Posts: 1240
pic
maybe there is sonething here you can use..it is javascript not jscript
http://www.w3schools.com/htmldom/dom_obj_document.asp

Post by trueBlue // Aug 31, 2007, 3:23pm

trueBlue
Total Posts: 1761
pic
Dele: I found what you were looking for.
When you use the File Dialog enter your Internet Shortcut
to the image you want and select Open.
It does not show the http path but rather the file path.
But it does work because I just tested it with your Signature
here on this forum.
:o
The magic is the script within the Import button.

I hooked this up to an Image Plane but you can harvest the
script inside.

Post by Délé // Sep 1, 2007, 5:27am

Délé
Total Posts: 1374
pic
Thanks trueBlue. :) Where do you type the web address though? I can't seem to get it to work.


So this works by the user defining where the image is with the file dialog? I was hoping to do it through script. The idea is that you could have a truePlay scene that updates with a website. When an image on a website is changed, the correlating texture in truePlay would change.


That "Bitmap.LoadFileFrom()" looks promising though. Maybe I'm just using it wrong.


btw, thanks for the link Stan. :)

Post by trueBlue // Sep 1, 2007, 9:55am

trueBlue
Total Posts: 1761
pic
Thanks trueBlue. :) Where do you type the web address though? I can't seem to get it to work.

So this works by the user defining where the image is with the file dialog? I was hoping to do it through script. The idea is that you could have a truePlay scene that updates with a website. When an image on a website is changed, the correlating texture in truePlay would change.

That "Bitmap.LoadFileFrom()" looks promising though. Maybe I'm just using it wrong.

btw, thanks for the link Stan. :)
Copy and Paste the Internet Shortcut in the Open dialog after your select the OpenFile Ctrl.
I seem to remember that the // had to be changed to \\ in script but I can not find that example. I beleive that this would have to be set up as a jScript command so that you could make it Run Automatically when loaded.

Post by 3dvisuals dude // Sep 2, 2007, 10:15am

3dvisuals dude
Total Posts: 1703
pic
I'm pretty sure I saw this or at least heard about it a while back. I want to create a bitmap output on a script that grabs the image from a remote server. I tried some things like below but can't figure it out.

function OnComputeOutputs(params)
{

var Bitmap = System.CreateDO('Common Data Package/Bitmap Data');

Bitmap = GetFile("http://www.website.com/image.jpg");

params.ConValue('Bitmap') = Bitmap;
}

Does anybody know how to get a remote bitmap file into a bitmap output? In the end I'm trying to get an image from a website to be a texture for an object. Should be easy, I just can't figure it out.

Thanks

Hi Délé,

If you guys manage to get this worked out it just might solve an issue I'm currently looking into as well...

Im trying to find a way to send remotely hosted images to the "D3D Texture render target" object using either its' existing Camera node (if a new camera type can be developed in this way) or its' existing "Preview refresh" node which is described as:

"Refresh of the preview (and non D3D bitmap interface)"

If a way can be developed to utilize remotely hosted images as input bitmaps to the D3D TRT Object, we would all have a great new way to have Live Meeting Slide Shows which would be very useful for presentations and also not be a bandwidth-hungry method adding to Server Load at the same time!

- Mark / 3dvisuals dude

Post by 3dvisuals dude // Sep 6, 2007, 8:31am

3dvisuals dude
Total Posts: 1703
pic
Thanks trueBlue. Yeah, I've gotten the image to show up on the node using the HTML control, but I need to assign it into a bitmap output so that I can link it into a texture for an object. I'm sure it's something simple, but playing the guessing game can be rather hard. I figured if anyone here already had an idea of how to do that it would save a lot of time. :)

in BitmapIn: 'Common Data Package/Bitmap Data'
out Bitmap: 'Common Data Package/Bitmap Data'


function OnComputeOutputs(params)
{
params.ConValue('Bitmap') = params.ConValue('BitmapIn');
}

'I harvested these from the multiple picture display in "The Living Room"
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn