From fa29cf5c5010f7c3e83494786be1b0c11c663e6d Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 14 Apr 2009 10:00:13 +0000 Subject: Update svn properties. --- .../Scripting/Minimodule/Graphics.cs | 96 +++++++++++----------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs index 44bae5c..bb4696b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs @@ -1,48 +1,48 @@ -using System.Drawing; -using OpenMetaverse; -using OpenMetaverse.Imaging; -using OpenSim.Framework; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Region.OptionalModules.Scripting.Minimodule -{ - class Graphics : IGraphics - { - private readonly Scene m_scene; - - public Graphics(Scene m_scene) - { - this.m_scene = m_scene; - } - - public UUID SaveBitmap(Bitmap data) - { - return SaveBitmap(data, false, true); - } - - public UUID SaveBitmap(Bitmap data, bool lossless, bool temporary) - { - AssetBase asset = new AssetBase(); - asset.FullID = UUID.Random(); - asset.Data = OpenJPEG.EncodeFromImage(data, lossless); - asset.Name = "MRMDynamicImage"; - asset.Type = 0; - asset.Description = "MRM Image"; - asset.Local = false; - asset.Temporary = temporary; - m_scene.CommsManager.AssetCache.AddAsset(asset); - - return asset.FullID; - } - - public Bitmap LoadBitmap(UUID assetID) - { - AssetBase bmp = m_scene.CommsManager.AssetCache.GetAsset(assetID, true); - ManagedImage outimg; - Image img; - OpenJPEG.DecodeToImage(bmp.Data, out outimg, out img); - - return new Bitmap(img); - } - } -} +using System.Drawing; +using OpenMetaverse; +using OpenMetaverse.Imaging; +using OpenSim.Framework; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.OptionalModules.Scripting.Minimodule +{ + class Graphics : IGraphics + { + private readonly Scene m_scene; + + public Graphics(Scene m_scene) + { + this.m_scene = m_scene; + } + + public UUID SaveBitmap(Bitmap data) + { + return SaveBitmap(data, false, true); + } + + public UUID SaveBitmap(Bitmap data, bool lossless, bool temporary) + { + AssetBase asset = new AssetBase(); + asset.FullID = UUID.Random(); + asset.Data = OpenJPEG.EncodeFromImage(data, lossless); + asset.Name = "MRMDynamicImage"; + asset.Type = 0; + asset.Description = "MRM Image"; + asset.Local = false; + asset.Temporary = temporary; + m_scene.CommsManager.AssetCache.AddAsset(asset); + + return asset.FullID; + } + + public Bitmap LoadBitmap(UUID assetID) + { + AssetBase bmp = m_scene.CommsManager.AssetCache.GetAsset(assetID, true); + ManagedImage outimg; + Image img; + OpenJPEG.DecodeToImage(bmp.Data, out outimg, out img); + + return new Bitmap(img); + } + } +} -- cgit v1.1