File tree Expand file tree Collapse file tree 6 files changed +31
-8
lines changed
Expand file tree Collapse file tree 6 files changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -79,13 +79,35 @@ public ImageForm(IVisualizerObjectProvider objectProvider)
7979 {
8080 objectBitmap = method . Invoke ( objectBitmap , null ) ;
8181 }
82-
82+
8383 BitmapSource bitmapSource = null ;
8484
8585 if ( objectBitmap is Bitmap )
8686 {
8787 var hObject = ( ( Bitmap ) objectBitmap ) . GetHbitmap ( ) ;
88-
88+
89+ try
90+ {
91+ bitmapSource = System . Windows . Interop . Imaging . CreateBitmapSourceFromHBitmap (
92+ hObject ,
93+ IntPtr . Zero ,
94+ Int32Rect . Empty ,
95+ BitmapSizeOptions . FromEmptyOptions ( ) ) ;
96+ }
97+ catch ( Win32Exception )
98+ {
99+ bitmapSource = null ;
100+ }
101+ finally
102+ {
103+ DeleteObject ( hObject ) ;
104+ }
105+ }
106+ #if VS16 || VS17
107+ else if ( objectBitmap is SerializableBitmap x)
108+ {
109+ var hObject = ( ( Bitmap ) x ) . GetHbitmap ( ) ;
110+
89111 try
90112 {
91113 bitmapSource = System . Windows . Interop . Imaging . CreateBitmapSourceFromHBitmap (
@@ -103,6 +125,7 @@ public ImageForm(IVisualizerObjectProvider objectProvider)
103125 DeleteObject ( hObject ) ;
104126 }
105127 }
128+ #endif
106129 else if ( objectBitmap is SerializableBitmapImage serializableBitmapImage)
107130 {
108131 bitmapSource = serializableBitmapImage ;
Original file line number Diff line number Diff line change 3232// You can specify all the values or you can default the Build and Revision Numbers
3333// by using the '*' as shown below:
3434// [assembly: AssemblyVersion("1.0.*")]
35- [ assembly: AssemblyVersion ( "1.0.0 .0" ) ]
36- [ assembly: AssemblyFileVersion ( "1.0.0 .0" ) ]
35+ [ assembly: AssemblyVersion ( "1.0.1 .0" ) ]
36+ [ assembly: AssemblyFileVersion ( "1.0.1 .0" ) ]
Original file line number Diff line number Diff line change 2929// You can specify all the values or you can default the Build and Revision Numbers
3030// by using the '*' as shown below:
3131// [assembly: AssemblyVersion("1.0.*")]
32- [ assembly: AssemblyVersion ( "1.0.0 .0" ) ]
33- [ assembly: AssemblyFileVersion ( "1.0.0 .0" ) ]
32+ [ assembly: AssemblyVersion ( "1.0.1 .0" ) ]
33+ [ assembly: AssemblyFileVersion ( "1.0.1 .0" ) ]
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<PackageManifest Version =" 2.0.0" xmlns =" http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns : d =" http://schemas.microsoft.com/developer/vsx-schema-design/2011" >
33 <Metadata >
4- <Identity Id =" 2443c97f-77f2-47ea-b473-7f34832b2f86" Version =" 1.0.0 " Language =" en-US" Publisher =" Aleksander Berus" />
4+ <Identity Id =" 2443c97f-77f2-47ea-b473-7f34832b2f86" Version =" 1.0.1 " Language =" en-US" Publisher =" Aleksander Berus" />
55 <DisplayName >Debugger Image Visualizer</DisplayName >
66 <Description xml : space =" preserve" >A debug visualizer for Visual Studio that allows you to visually view the graphic content of images during debugging.</Description >
77 <MoreInfo >https://github.com/aberus/ImageVisualizer</MoreInfo >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <?define ProductVersion = " 1.0.0 " ?>
2+ <?define ProductVersion = " 1.0.1 " ?>
33<?define ProductUpgradeCode = " 5a2e7ccd-6ced-4a6b-9745-d8d73ed070cc" ?>
44<Wix xmlns =" http://schemas.microsoft.com/wix/2006/wi" xmlns : VSExtension =" http://schemas.microsoft.com/wix/VSExtension" >
55 <Product Id =" *" Name =" Debugger Image Visualizer for Visual Studio" Language =" 1033" Version =" $(var.ProductVersion)" Manufacturer =" Aleksander Berus" UpgradeCode =" $(var.ProductUpgradeCode)" >
You can’t perform that action at this time.
0 commit comments