why where map and dynamic textures compressed lossless?

httptests
UbitUmarov 2018-05-04 16:59:11 +01:00
parent 9ae3452e03
commit 7838689dda
5 changed files with 9 additions and 9 deletions

View File

@ -389,7 +389,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
try try
{ {
imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, true); imageJ2000 = OpenJPEG.EncodeFromImage(bitmap, false);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -153,7 +153,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
using (Bitmap mapbmp = CreateMapTile()) using (Bitmap mapbmp = CreateMapTile())
{ {
if (mapbmp != null) if (mapbmp != null)
return OpenJPEG.EncodeFromImage(mapbmp, true); return OpenJPEG.EncodeFromImage(mapbmp, false);
} }
} }
catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke

View File

@ -251,7 +251,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
try try
{ {
using (Bitmap mapbmp = CreateMapTile()) using (Bitmap mapbmp = CreateMapTile())
return OpenJPEG.EncodeFromImage(mapbmp, true); return OpenJPEG.EncodeFromImage(mapbmp, false);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -1673,13 +1673,13 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
newsize.Height = (int)(by * scale); newsize.Height = (int)(by * scale);
using(Bitmap scaledbmp = new Bitmap(mapbmp,newsize)) using(Bitmap scaledbmp = new Bitmap(mapbmp,newsize))
data = OpenJPEG.EncodeFromImage(scaledbmp, true); data = OpenJPEG.EncodeFromImage(scaledbmp, false);
} }
else else
data = OpenJPEG.EncodeFromImage(mapbmp, true); data = OpenJPEG.EncodeFromImage(mapbmp, false);
} }
else else
data = OpenJPEG.EncodeFromImage(mapbmp, true); data = OpenJPEG.EncodeFromImage(mapbmp, false);
if (data != null && data.Length > 0) if (data != null && data.Length > 0)
{ {
@ -1857,7 +1857,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
try try
{ {
return OpenJPEG.EncodeFromImage(overlay, true); return OpenJPEG.EncodeFromImage(overlay, false);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -189,7 +189,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
using (Bitmap bitmap = new Bitmap(filename)) using (Bitmap bitmap = new Bitmap(filename))
{ {
//m_log.Debug("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width); //m_log.Debug("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width);
imageData = OpenJPEG.EncodeFromImage(bitmap, true); imageData = OpenJPEG.EncodeFromImage(bitmap, false);
} }
AssetBase ass = new AssetBase(UUID.Random(), "region " + name, (sbyte)AssetType.Texture, regionID.ToString()); AssetBase ass = new AssetBase(UUID.Random(), "region " + name, (sbyte)AssetType.Texture, regionID.ToString());