Skip to content
This repository has been archived by the owner on Jul 24, 2022. It is now read-only.

Commit

Permalink
Reduce memory footprint by ~95% by reducing bitmap decode size
Browse files Browse the repository at this point in the history
  • Loading branch information
Faith committed May 30, 2018
1 parent 8f5b240 commit ee07b4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Spectabis-WPF/Views/Library.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,9 @@ private Image CreateBoxArtResource(string game)
artSource.CacheOption = System.Windows.Media.Imaging.BitmapCacheOption.OnLoad;
artSource.UriSource = new Uri(game + @"\art.jpg", UriKind.RelativeOrAbsolute);

artSource.DecodePixelHeight = 200;
artSource.DecodePixelWidth = 150;

//Closes the filestream
artSource.EndInit();

Expand Down

0 comments on commit ee07b4b

Please sign in to comment.