[Opensim-dev] How to retreive pictures from the inventory ?

Justin Clark-Casey jjustincc at googlemail.com
Tue Feb 16 00:22:38 UTC 2010


Valentin Castan wrote:
> Dear all,
> 
> I'm working on a project where I have to process images, using another 
> application, and then display something in OpenSim. I would like to let 
> users to upload their pictures on OpenSim, but I have to retreive these 
> pictures, and copy them in a special directory.
> My problem is in the code of OpenSim, I only can find how to retreive an 
> InventoryItemBase from the inventory, but I didn't find any way to 
> retreive a picture, to be able to copy it.
> Does someone know how can I retreive pictures from the Inventory, but 
> not as an InventoryItemBase, but as something I can use as a picture ?

You need to use the AssetID property in InventoryItemBase to retrieve the picture from the asset service.  Something like

AssetBase asset = Scene.AssetService.Get(item.AssetID)

ought to do it.  asset.Data can then be written out to a file.

> 
> Thank you a lot for your help,
> Best regards,
> Valentin Castan
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev


-- 
Justin Clark-Casey (justincc)
http://justincc.org
http://twitter.com/justincc



More information about the Opensim-dev mailing list