Browse Source

Merge pull request #2595 from AustinWise/austin/FixIconLoading

Fix displaying icons from embedded resources
pull/2606/head
Siegfried Pammer 4 years ago committed by GitHub
parent
commit
0f577200f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs

2
ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs

@ -59,7 +59,7 @@ namespace ICSharpCode.ILSpy.TreeNodes @@ -59,7 +59,7 @@ namespace ICSharpCode.ILSpy.TreeNodes
using var data = OpenStream();
if (data == null)
return false;
IconBitmapDecoder decoder = new IconBitmapDecoder(data, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.None);
IconBitmapDecoder decoder = new IconBitmapDecoder(data, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad);
foreach (var frame in decoder.Frames)
{
output.Write(String.Format("{0}x{1}, {2} bit: ", frame.PixelHeight, frame.PixelWidth, frame.Thumbnail.Format.BitsPerPixel));

Loading…
Cancel
Save