From: alan webb <alan_webb@us.ibm.com>

this adds image conversion features to the REST inventory/asset code.
0.6.0-stable
Dr Scofield 2008-08-06 15:20:45 +00:00
parent 5248c18b7d
commit ae13fec655
2 changed files with 7 additions and 2 deletions

View File

@ -31,6 +31,7 @@ using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Xml;
using System.Drawing;
using OpenJPEGNet;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
@ -1931,8 +1932,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
if (ic.Item.AssetType == (int) AssetType.TextureTGA ||
ic.Item.AssetType == (int) AssetType.ImageTGA)
{
// TODO: DO we need to convert it? Or is it enough to flag
// it appropriately?
Bitmap temp;
Stream tgadata = new MemoryStream(ic.Asset.Data);
temp = OpenJPEGNet.LoadTGAClass.LoadTGA(tgadata);
ic.Asset.Data = OpenJPEGNet.OpenJPEG.EncodeFromImage(temp, true);
}
ic.reset();

View File

@ -1255,6 +1255,7 @@
<Reference name="Mono.Addins.dll" />
<Reference name="System"/>
<Reference name="System.Xml"/>
<Reference name="System.Drawing"/>
<Reference name="libsecondlife.dll" />
<Reference name="Nini.dll" />
<Reference name="XMLRPC.dll" />