File tree 6 files changed +31
-8
lines changed 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)
79
79
{
80
80
objectBitmap = method . Invoke ( objectBitmap , null ) ;
81
81
}
82
-
82
+
83
83
BitmapSource bitmapSource = null ;
84
84
85
85
if ( objectBitmap is Bitmap )
86
86
{
87
87
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
+
89
111
try
90
112
{
91
113
bitmapSource = System . Windows . Interop . Imaging . CreateBitmapSourceFromHBitmap (
@@ -103,6 +125,7 @@ public ImageForm(IVisualizerObjectProvider objectProvider)
103
125
DeleteObject ( hObject ) ;
104
126
}
105
127
}
128
+ #endif
106
129
else if ( objectBitmap is SerializableBitmapImage serializableBitmapImage)
107
130
{
108
131
bitmapSource = serializableBitmapImage ;
Original file line number Diff line number Diff line change 32
32
// You can specify all the values or you can default the Build and Revision Numbers
33
33
// by using the '*' as shown below:
34
34
// [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 29
29
// You can specify all the values or you can default the Build and Revision Numbers
30
30
// by using the '*' as shown below:
31
31
// [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 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<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" >
3
3
<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" />
5
5
<DisplayName >Debugger Image Visualizer</DisplayName >
6
6
<Description xml : space =" preserve" >A debug visualizer for Visual Studio that allows you to visually view the graphic content of images during debugging.</Description >
7
7
<MoreInfo >https://github.com/aberus/ImageVisualizer</MoreInfo >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <?define ProductVersion = " 1.0.0 " ?>
2
+ <?define ProductVersion = " 1.0.1 " ?>
3
3
<?define ProductUpgradeCode = " 5a2e7ccd-6ced-4a6b-9745-d8d73ed070cc" ?>
4
4
<Wix xmlns =" http://schemas.microsoft.com/wix/2006/wi" xmlns : VSExtension =" http://schemas.microsoft.com/wix/VSExtension" >
5
5
<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