From 040c8d5e9a0de8b722924d4fc5ef3d5f6c91f16a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 4 Nov 2019 20:17:12 +0000 Subject: dynamic textures: add ' lossless: [true|false] ', default false, extraParam --- .../Scripting/VectorRender/VectorRenderModule.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 5a3f359..50afe8b 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -217,6 +217,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender string[] nvps = extraParams.Split(paramDelimiter); + bool lossless = false; int temp = -1; foreach (string pair in nvps) { @@ -306,10 +307,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender bgColor = Color.FromName(value); } break; - case "altdatadelim": - altDataDelim = value.ToCharArray()[0]; - break; - case "": + case "altdatadelim": + altDataDelim = value.ToCharArray()[0]; + break; + case "lossless": + if (value.ToLower() == "true") + lossless = true; + break; + case "": // blank string has been passed do nothing just use defaults break; default: // this is all for backwards compat, all a bit ugly hopfully can be removed in future @@ -385,7 +390,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender try { - imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, false); + imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, lossless); } catch (Exception e) { -- cgit v1.1