diff options
author | Justin Clark-Casey (justincc) | 2012-01-05 22:54:33 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-05 22:54:33 +0000 |
commit | b86e7715a8d8f081fa9452d92a9d8f6d52867a12 (patch) | |
tree | e1245aebdd898330d89b39a17a5e9a7de09a7fba /OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs | |
parent | Add a "j2k decode" region console command that allows a manual request for a ... (diff) | |
download | opensim-SC_OLD-b86e7715a8d8f081fa9452d92a9d8f6d52867a12.zip opensim-SC_OLD-b86e7715a8d8f081fa9452d92a9d8f6d52867a12.tar.gz opensim-SC_OLD-b86e7715a8d8f081fa9452d92a9d8f6d52867a12.tar.bz2 opensim-SC_OLD-b86e7715a8d8f081fa9452d92a9d8f6d52867a12.tar.xz |
Improve "j2k decode" command to tell us how many layers and components were decoded, instead of just success/failure
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs | 16 |
1 files changed, 13 insertions, 3 deletions
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; | |||
34 | using Mono.Addins; | 34 | using Mono.Addins; |
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using OpenMetaverse; | 36 | using OpenMetaverse; |
37 | using OpenMetaverse.Imaging; | ||
37 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Console; | 39 | using OpenSim.Framework.Console; |
39 | using OpenSim.Region.Framework.Interfaces; | 40 | using OpenSim.Region.Framework.Interfaces; |
@@ -137,9 +138,18 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender | |||
137 | return; | 138 | return; |
138 | } | 139 | } |
139 | 140 | ||
140 | if (decoder.Decode(assetId, asset.Data)) | 141 | OpenJPEG.J2KLayerInfo[] layers; |
141 | MainConsole.Instance.OutputFormat("Successfully decoded asset {0}", assetId); | 142 | int components; |
143 | if (decoder.Decode(assetId, asset.Data, out layers, out components)) | ||
144 | { | ||
145 | MainConsole.Instance.OutputFormat( | ||
146 | "Successfully decoded asset {0} with {1} layers and {2} components", | ||
147 | assetId, layers.Length, components); | ||
148 | } | ||
142 | else | 149 | else |
143 | MainConsole.Instance.OutputFormat("Decode of asset {0} failed", assetId); } | 150 | { |
151 | MainConsole.Instance.OutputFormat("Decode of asset {0} failed", assetId); | ||
152 | } | ||
153 | } | ||
144 | } | 154 | } |
145 | } \ No newline at end of file | 155 | } \ No newline at end of file |