30 using OpenMetaverse.Imaging;
31 using OpenSim.Framework;
32 using OpenSim.Region.Framework.Scenes;
34 namespace OpenSim.
Region.OptionalModules.Scripting.Minimodule
38 private readonly
Scene m_scene;
42 this.m_scene = m_scene;
47 return SaveBitmap(data,
false,
true);
50 public UUID
SaveBitmap(Bitmap data,
bool lossless,
bool temporary)
52 AssetBase asset =
new AssetBase(UUID.Random(),
"MRMDynamicImage", (sbyte)AssetType.Texture, m_scene.RegionInfo.RegionID.ToString());
53 asset.Data = OpenJPEG.EncodeFromImage(data, lossless);
54 asset.Description =
"MRM Image";
56 asset.Temporary = temporary;
57 m_scene.AssetService.Store(asset);
64 AssetBase bmp = m_scene.AssetService.Get(assetID.ToString());
67 OpenJPEG.DecodeToImage(bmp.Data, out outimg, out img);
69 return new Bitmap(img);
UUID SaveBitmap(Bitmap data)
Asset class. All Assets are reference by this class or a class derived from this class ...
Bitmap LoadBitmap(UUID assetID)
UUID SaveBitmap(Bitmap data, bool lossless, bool temporary)