From b86e7715a8d8f081fa9452d92a9d8f6d52867a12 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 5 Jan 2012 22:54:33 +0000 Subject: Improve "j2k decode" command to tell us how many layers and components were decoded, instead of just success/failure --- .../Agent/TextureSender/J2KDecoderCommandModule.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs index b224132..439096a 100644 --- a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs @@ -34,6 +34,7 @@ using log4net; using Mono.Addins; using Nini.Config; using OpenMetaverse; +using OpenMetaverse.Imaging; using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; @@ -137,9 +138,18 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender return; } - if (decoder.Decode(assetId, asset.Data)) - MainConsole.Instance.OutputFormat("Successfully decoded asset {0}", assetId); + OpenJPEG.J2KLayerInfo[] layers; + int components; + if (decoder.Decode(assetId, asset.Data, out layers, out components)) + { + MainConsole.Instance.OutputFormat( + "Successfully decoded asset {0} with {1} layers and {2} components", + assetId, layers.Length, components); + } else - MainConsole.Instance.OutputFormat("Decode of asset {0} failed", assetId); } + { + MainConsole.Instance.OutputFormat("Decode of asset {0} failed", assetId); + } + } } } \ No newline at end of file -- cgit v1.1