aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Hypergrid
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 0430ef6..19dffc3 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -154,7 +154,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
154 154
155 UUID mapTile = m_HGMapImage; 155 UUID mapTile = m_HGMapImage;
156 string filename = string.Empty; 156 string filename = string.Empty;
157 Bitmap bitmap = null; 157
158 try 158 try
159 { 159 {
160 WebClient c = new WebClient(); 160 WebClient c = new WebClient();
@@ -167,11 +167,18 @@ namespace OpenSim.Services.Connectors.Hypergrid
167 c.DownloadFile(imageURL, filename); 167 c.DownloadFile(imageURL, filename);
168 } 168 }
169 else 169 else
170 {
170 m_log.DebugFormat("[GATEKEEPER SERVICE CONNECTOR]: using cached image"); 171 m_log.DebugFormat("[GATEKEEPER SERVICE CONNECTOR]: using cached image");
172 }
173
174 byte[] imageData = null;
171 175
172 bitmap = new Bitmap(filename); 176 using (Bitmap bitmap = new Bitmap(filename))
173 //m_log.Debug("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width); 177 {
174 byte[] imageData = OpenJPEG.EncodeFromImage(bitmap, true); 178 //m_log.Debug("Size: " + m.PhysicalDimension.Height + "-" + m.PhysicalDimension.Width);
179 imageData = OpenJPEG.EncodeFromImage(bitmap, true);
180 }
181
175 AssetBase ass = new AssetBase(UUID.Random(), "region " + name, (sbyte)AssetType.Texture, regionID.ToString()); 182 AssetBase ass = new AssetBase(UUID.Random(), "region " + name, (sbyte)AssetType.Texture, regionID.ToString());
176 183
177 // !!! for now 184 // !!! for now