// Token: 0x060000DC RID: 220 RVA: 0x00011200 File Offset: 0x0000F400
 public void LoadFromDota(string textureKey, string file, int w = 0, int h = 0, bool rounded = false, int brightness = 0, Vector4?colorRatio = null)
 {
     if (this.TextureCache.ContainsKey(textureKey))
     {
         return;
     }
     this.TextureCache[textureKey] = default(T);
     Task.Run(delegate
     {
         try
         {
             Bitmap bitmap = this.VpkBrowser.FindImage(file);
             if (bitmap == null)
             {
                 Logger.Warn(string.Format("O9K // Can't find Dota Texture: {0}", file));
             }
             else
             {
                 using (MemoryStream memoryStream = new MemoryStream())
                 {
                     if (w > 0 && h > 0 && (w != bitmap.Width || h != bitmap.Height))
                     {
                         bitmap = bitmap.Clone(new Rectangle(0, 0, Math.Min(bitmap.Width, w), Math.Min(bitmap.Height, h)), bitmap.PixelFormat);
                     }
                     if (rounded)
                     {
                         float xRatio;
                         if (!this.heroRoundAdjustments.TryGetValue(textureKey, out xRatio))
                         {
                             xRatio = 0.5f;
                         }
                         bitmap = D3TextureManager <T> .RoundImage(bitmap, xRatio);
                     }
                     if (this.ChangeBrightness)
                     {
                         bitmap = D3TextureManager <T> .AdjustBrightness(bitmap, -35);
                     }
                     if (colorRatio != null)
                     {
                         bitmap = D3TextureManager <T> .AdjustColor(bitmap, colorRatio.Value);
                     }
                     if (brightness != 0)
                     {
                         bitmap = D3TextureManager <T> .AdjustBrightness(bitmap, brightness);
                     }
                     bitmap.Save(memoryStream, ImageFormat.Png);
                     bitmap.Dispose();
                     this.LoadFromStream(textureKey, memoryStream);
                 }
             }
         }
         catch (Exception exception)
         {
             Logger.Error(exception, file);
         }
     });
 }
 // Token: 0x060000E4 RID: 228 RVA: 0x000115A4 File Offset: 0x0000F7A4
 public void LoadOutlineFromDota(string textureKey, string file, int brightness = 0, Vector4?colorRatio = null)
 {
     if (this.TextureCache.ContainsKey(textureKey))
     {
         return;
     }
     this.TextureCache[textureKey] = default(T);
     Task.Run(delegate
     {
         try
         {
             Bitmap bitmap = this.VpkBrowser.FindImage(file);
             if (bitmap == null)
             {
                 Logger.Warn(string.Format("O9K // Can't find Dota Texture: {0}", file));
             }
             else
             {
                 if (this.ChangeBrightness)
                 {
                     bitmap = D3TextureManager <T> .AdjustBrightness(bitmap, -35);
                 }
                 if (colorRatio != null)
                 {
                     bitmap = D3TextureManager <T> .AdjustColor(bitmap, colorRatio.Value);
                 }
                 if (brightness != 0)
                 {
                     bitmap = D3TextureManager <T> .AdjustBrightness(bitmap, brightness);
                 }
                 for (int i = 0; i <= 100; i++)
                 {
                     using (MemoryStream memoryStream = new MemoryStream())
                     {
                         Bitmap bitmap2 = D3TextureManager <T> .PieImage(bitmap, i);
                         bitmap2.Save(memoryStream, ImageFormat.Png);
                         bitmap2.Dispose();
                         this.LoadFromStream(textureKey + i, memoryStream);
                     }
                 }
                 bitmap.Dispose();
             }
         }
         catch (Exception exception)
         {
             Logger.Error(exception, file);
         }
     });
 }