From: alan webb <alan_webb@us.ibm.com>
this adds image conversion features to the REST inventory/asset code.0.6.0-stable
parent
5248c18b7d
commit
ae13fec655
|
@ -31,6 +31,7 @@ using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using System.Drawing;
|
||||||
using OpenJPEGNet;
|
using OpenJPEGNet;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
|
@ -1931,8 +1932,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
if (ic.Item.AssetType == (int) AssetType.TextureTGA ||
|
if (ic.Item.AssetType == (int) AssetType.TextureTGA ||
|
||||||
ic.Item.AssetType == (int) AssetType.ImageTGA)
|
ic.Item.AssetType == (int) AssetType.ImageTGA)
|
||||||
{
|
{
|
||||||
// TODO: DO we need to convert it? Or is it enough to flag
|
Bitmap temp;
|
||||||
// it appropriately?
|
Stream tgadata = new MemoryStream(ic.Asset.Data);
|
||||||
|
|
||||||
|
temp = OpenJPEGNet.LoadTGAClass.LoadTGA(tgadata);
|
||||||
|
ic.Asset.Data = OpenJPEGNet.OpenJPEG.EncodeFromImage(temp, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ic.reset();
|
ic.reset();
|
||||||
|
|
|
@ -1255,6 +1255,7 @@
|
||||||
<Reference name="Mono.Addins.dll" />
|
<Reference name="Mono.Addins.dll" />
|
||||||
<Reference name="System"/>
|
<Reference name="System"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
|
<Reference name="System.Drawing"/>
|
||||||
<Reference name="libsecondlife.dll" />
|
<Reference name="libsecondlife.dll" />
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
<Reference name="XMLRPC.dll" />
|
<Reference name="XMLRPC.dll" />
|
||||||
|
|
Loading…
Reference in New Issue