Image Watch

Microsoft Free

Provides a watch window for visualizing in-memory images (bitmaps) when debugging native C++ code.

(39) Review
Visual Studio
2015, 2013, 2012
Download (42,693)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (39)
Q and A (79)
Sign in to write a review
Sort by:

by olvrw | July 22 2015

by StevenHickson | July 17 2015

I really can't say enough about this plugin. It makes debugging for computer vision much easier and faster.
The visualization of custom classes is easy and also a great addition.

by zzdrghost | May 05 2015


by SergBabiychuk | April 16 2015

Great tools!
But I would like to see support:
1) for Qt5 objects: QImage,QPixmap(QBitmap)
2) for any pointers, with user selection of image parameters while debugging

by Baris Demiroz | March 24 2015

by Eejdoowad | March 13 2015

by Jaka Konda | March 03 2015

by vuki | February 27 2015

A must if you program with OpenCV

by bambambigelow | January 28 2015

this is an amazing extension! works like a charm and saves a lot of hassle while debugging opencv code

by Y.T. Tommy HU | January 08 2015

by Lukas Neumann1 | December 19 2014

Works like a charm, this add-in is a must for everyone working with OpenCV in Visual Studio.

by Elador | December 16 2014

THE best and most amazing plugin ever! Makes coding so much more productive, and more fun as well.

If you want one suggestion on what to improve, I'd say @mem(...). I don't needed it often, but when I'd need it, I most of the time can't get it to work. It's kind of documented, but I'm never sure: Do I put in the name of the variable? or '&variable'? or the address? or the address with 0x...? or...? and more often than not it's not working, and also not printing any error/debug information.

I think what would be useful as well is a small button that opens a menu that shows all the operators you can use, and their syntax - like a small documentation inside.

But those are just some tiny suggestions. It is incredible as it is!

by Mor CH | November 09 2014

absolutely useful and great, but I want this add-on for both Xcode and eclipse (Mac and Linux) very bad please.

by John Dance | September 12 2014

This makes debugging image handling so much easier. I love it! Thank you! The ability to extend to my image types (QImage/QPixmap) is a game changer.

by Rob42_ | August 04 2014

Thanks for this great extension to Visual Studio,
would like to see this open sourced to add even more features.

by Mudit Agrawal | June 24 2014

This is indeed a game changer! Debugging in-memory images has always been so hard in VS. The simple power of Image-Watch visualization, combined with the efficient operators can turn hours of debugging to minutes or seconds.

Great work!

by lin jingxian | April 06 2014

sounds good, but can not use with vs 2013 express ?

by V.N.V | February 23 2014

Just a note to say a simple Thank You to the author.

This extension is excellent.

It provides a "quicklook" into a sequence of images from a loop.

Without it, I'd be spending much more time on the problem. I'd need to save each image to disk, with a serialized name,
and bring each up individually in an external viewer.

by Daehoe Kim | January 28 2014

Excellent tool. I love it :)

by Chris Sienkiewicz | December 26 2013

Fantastic add in, makes working with images so much easier.

1 - 20 of 39 Items   
Sign in to start a discussion

  • raw bitmap
    4 Posts | Last post June 11, 2015
    • Hello.
      This extension has potential to be very useful to me. However, I don't have objects that represent pictures; I only have pointers to raw data (such as uchar *), paired with variables that hold width, height and stride.
      It would be great if you could add possibility to look images in a generic way - add another radio button which will show fields that could be manually edited (picture address, width, height, stride, format).
    • We will add support for this scenario in an upcoming update. Please see also the "Raw binary blob support" thread.
    • Is there any update on this? I just downloaded the latest version today and I have the same request. Thanks!
    • Hi! Update 1.0.1071.0 (April 2014) introduced the @mem operator to support this scenario. It is described on our help page under "Image Operators". Let us know if this isn't what you were looking for, or if you run into any problems with it. Thanks! -Wolf
  • Flip Image Vertically
    3 Posts | Last post June 09, 2015
    • Hi,
      we are amazed by this extension and would like to thank you for your hard work! 
      We have a small wish however: 
      Due to the great extendability via natvis we were able to quickly visualize our internal image. Unfortunately the origin of this internal image format is bottom left instead of top left. This leads the the images being displayed bottom up in the Image Watch. 
      Would it be possible to add some feature to be able to configure the visualization in the natvis for such flipped images? We could imagine e.g. a dedicated flag or maybe a negative stride? 
      Please do not mind if such feature already exists and we couldn't find it :)
      Thanks in advance!
    • Hi Wolfgang, 
      thanks very much for your feedback! You are right, the feature you are mentioning does not exist at this time. And I agree that it would be very useful to have. I'll add it to our TODO list for one of the next updates. 
      Best wishes,
    • Ping?
  • How does this work?
    2 Posts | Last post May 14, 2015
    • I can't seem to get this to visualize HBITMAPs or HICONs.  There is no magnifying glass as you specified.
      What am I doing wrong?
    • Oh, I see from the help that I got to through the Image Watch window shows that the image types that this plug in has support from are not WIN32 objects.  Forget it, this isn't what I'm looking for.  I don't think the Extensibility section will allow for this either. :(
  • Can't update Image Watch (.Net Framework)
    9 Posts | Last post April 23, 2015
    • Hi,
      I cannot update Image Watch recently (from 1.5.1103.0 to 1.5.1106.0) in Visual Studio 2013. The error is related to .Net Framework: The extension 'Image Watch' requires a version of the .Net Framework that is not installed.
      I think the issue is related to my installation of Visual Studio 2015 Preview which install .Net FrameWork 4.6 Preview. I think ImageWatch is not aware that I still have 4.5 installed due to 4.6 being also installed.
      Thank you for this great extension.
    • Erratum: I have Visual Studio 2015 CTP6 intalled.
    • Yes, Mee Two!
      Please fix this. I'm flying blind.
    • I have various flavours of Visual Studio 10,11,12, 13 (2010, 2013, and 2015 CTP preview).
      I'm getting startup failures reported without log entries and when I go to update add-ins, this add in won't update for some spurious nonsense reference to .net. I have every .net that has ever been released and pre-released. This is a good tool and a better idea. Shame it can break so easily.
    • Hi guys, 
      thanks for reporting this. We haven't seen this in our tests yet. Could you please share some more information about your setup so we can repro? 
      Versions of VS installed? 
      Order or VS installs? 
      In which version of VS do you see the error message? 
      Did you have (an older) IW installed and working before you installed 2015? 
      When exactly do you get the error message (during install, VS startup, or debugger startup)?
      Can you build and run a C# project in VS that targets .NET 4.5?
    • Update: after searching around a bit it seems that other extensions are having the same issue since they installed VS 2015. I still don't have a repro but I will find out if Visual Studio is planning to issue a fix, or if we have to change something on our end. 
      In the meantime, can you please try the workaround below? This has been posted on the "VSCommands" extension's forum, which had the same issue. 
      Download extension
      Rename .vsix file to .zip and open archive
      Edit extension.vsixmanifest
      Change line
           <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" Version="4.5" />
          <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" MinVersion="4.5" />
      Close editor
      Update archive
      Then install
      More info here:
    • Hi,
      Looks like the issue is related to the Update feature in the extension dialog in Visual Studio 2013. I was able to successfully update Image Watch by running the .vsix file directly (I did not do any modification to the manifest). 
      I also tried on a different user account (same PC). Image watch was not installed on that user account. Using the extensions dialog I failed to install (not update) Image watch for the same reason (.Net framework). I was able to install the extension with the vsix file though. 
      Hope this will help.
    • Thanks, Sebastien! This is very useful information. 
    • OK, we published another update yesterday. 
      The update has the same binaries and version number (1.5.1106). The only difference is the how the .NET dependency is specified in the manifest file. We hope that this fixes the issue. 
      Thanks again for reporting this.
  • 64 bit integers
    2 Posts | Last post April 20, 2015
    • Hi,
      Any plans on adding support for 64 bit integer images? 
      I am currently trying to use ImageWatch to visualize Eigen matrices and have it partially working for the int32, float and double types, but it fails if I want to use int64_t since 64 bit integers are not in your supported types list. 
      I could contribute a patch if I can get access to the source code. 
      Here are the partially working natvis for Eigen::Matrix types:
      Please note that they only work properly for RowMajor matrices. For column major the image is displayed as if it was transposed. You can however make it look right by using the @flipd operator.
    • Hi GDumont,
      many thanks for sharing your Eigen visualizers! 
      At this time we don't have plans to support 64 bit integers, sorry :/. One workaround might be to interpret the data as a two-channel 32bit image and, if needed, use the @band operator to look at the "low-word" vs "high-word" image. Certainly not optimal, but maybe better than not seeing anything at all?
  • Update Stopped the Ability to showe Images for My Own Image Type
    2 Posts | Last post April 20, 2015
    • Hi,
      I have my own image format with a buffer (same logic with opencv) and a wrapper class for opencv. Old version of Image Watch was able to display my images directly from my image format by clicking at the magnifier icon next to the pointer that points to the buffer. It was also same for the wrapped format where I clicked at the icon next to the buffer pointer.
      After the update, magnifier icon does not appear at all in my image format. In the wrapped format, I get [Raw] field and cv::Mat under it where the magnifier icon appears.
      What has changed with the update and why do I face with this situation?
      Kind regards
    • Hi elebasi,
      sorry to hear that. We didn't change anything that would result in what you're seeing (at least not intentionally). 
      Would you mind sharing the definition of your wrapper class and the .natvis file you wrote for it?
  • Can't install Image Watch
    2 Posts | Last post April 07, 2015
    • I have MSVC 2012 express and can't install Image Watch. What should I do to install it? Here is the log I get:
      03.04.2015 21:00:26 - 	Supported Products : 
      03.04.2015 21:00:26 - 		Microsoft.VisualStudio.Pro
      03.04.2015 21:00:26 - 			Version : [11.0,13.0)
      03.04.2015 21:00:26 - 
      03.04.2015 21:00:26 - 	References      : 
      03.04.2015 21:00:26 - 		-------------------------------------------------------
      03.04.2015 21:00:26 - 		Identifier   : Microsoft.VisualStudio.MPF.11.0
      03.04.2015 21:00:26 - 		Name         : Visual Studio MPF 11.0
      03.04.2015 21:00:26 - 		Version      : 11.0
      03.04.2015 21:00:26 - 		MoreInfoURL  : 
      03.04.2015 21:00:26 - 		Nested       : No
      03.04.2015 21:00:26 - 
      03.04.2015 21:00:26 - 
      03.04.2015 21:00:26 - Searching for applicable products...
      03.04.2015 21:00:27 - Found installed product - Microsoft Visual Studio Express 2012 for Windows Desktop
      03.04.2015 21:00:27 - Found installed product - Global Location
      03.04.2015 21:00:27 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
         at VSIXInstaller.App.InitializeInstall()
         at System.Threading.Tasks.Task.InnerInvoke()
         at System.Threading.Tasks.Task.Execute()
    • Hi nicram889,
      Visual Studio Express does not support extensions (i.e. plug-ins, like Image Watch). 
      I would switch to the "Community" edition of VS: 
      The Community edition is free, just like the Express editions, and it supports extensions like Image Watch.
    10 Posts | Last post April 01, 2015
    • Hi,
      I have a image class with protected width, height & data. They are all accessible via member functions. Is there a way to write the .natvis file so that the image can be displayed correctly during debugging?
    • Hi Alexanderwyx, the debugger has access to all data members regardless of their access specifiers (public/protected/private). In other words, you can access your data members in the natvis as if they were public. Is that what you meant?
    • I have quite similar question to one Alexanderwyx asked. I'd like to display a QImage instance from the Qt 5 library (see for ref.) and an access to necessary data is only through member functions: width(), height(), bits() etc. Both the @mem operator and the .natvis file need member variables which in this case is problematic. Can you implement such a feature in the next release?
    • Hi Franc, 
      looking at the Qt 5 implementation I believe you should be able to visualize QImage objects with the current version of ImageWatch. QImage has a data member "d" which is a pointer to a QImageData object. QImageData has data members called "width", "height", "bytes_per_line", "format", and "data". QImage::width() simply returns d->width, so you should be able to do the same in your natvis (see example below). For pixel format, you can query QImageData's "format" member using the "Condition" attribute in the natvis. 
      So here's how I think your natvis could work. This example supports ARGB32 (5) and RGB888 (13) formats; you can add more, of course. Plase note that there could be errors, since I don't have a Qt build environment and couldn't test it.
      <Item Name="[width]">d->width</Item>. 
      <Item Name="[height]">d->height</Item>. 
      <Item Name="[stride]">d->bytes_per_line</Item>. 
      <Synthetic Name="[type]" Condition="d->format==5">
      <Synthetic Name="[type]" Condition="d->format==13">
      <Synthetic Name="[channels]" Condition="d->format==5">
      <Synthetic Name="[channels]" Condition="d->format==13">
      Please let me know if this solves your problem. 
    • Re-reading my reply I realized the "[data]" item is missing in my example natvis:
      <Item Name="[data]">d->data</Item>
    • Thank you Wolf for the hint. It looks like the "d" data member of QImage class is an opaque pointer and in order to force VS "see" QImageData members I must include a private header of QImage (QtGui\5.0.2\QtGui\private\qimage_p.h). Then finally Image Watch works with QImage.
      The problem is with a monochrome image where the image is stored using 1 bit per pixel. A part of d->data (a row the image) indicated by d->bytes_per_line almost always contains some rubbish at the end because the data chunk rounds to bytes. Do you have any idea how to cope with this?
    • Hi Franc, 
      great to hear that QImage works now! Thanks for pointing out the privateness of qimage_p.h. I hadn't noticed that. It's a little awkward, of course, to have to include that header, but I hope the better debugging experience makes up for it :) 
      I can see the problem with 1-bit-per-pixel formats (QImage::Format_Mono?). Unfortunately, there's no good workaround with the current version of Image Watch, since we don't support non-integer strides. Sorry..
    • Hi Wolf:
      I just found ImageWatch and love it. Thank you. Others might be interested in supporting QImage/QPixmap without adding a private header into their build. I cannot do that. Here is a definition for QImage that will work without the private header for all the 32bpp formats: 
        <Type Name="QImage">
            <Synthetic Name="[type]">
            <Synthetic Name="[channels]" Condition="(*(int*)(((char*)d)+48))==4">
            <Synthetic Name="[channels]" Condition="(*(int*)(((char*)d)+48))==5">
            <Synthetic Name="[channels]" Condition="(*(int*)(((char*)d)+48))==6">
            <Item Name="[width]">((Qt5Guid.dll!QImageData*)d)->width</Item>
            <Item Name="[height]">((Qt5Guid.dll!QImageData*)d)->height</Item>
            <Item Name="[depth]">((Qt5Guid.dll!QImageData*)d)->depth</Item>
            <Item Name="[nbytes]">((Qt5Guid.dll!QImageData*)d)->nbytes</Item>
            <Item Name="[devicePixelRatio]">((Qt5Guid.dll!QImageData*)d)->devicePixelRatio</Item>
            <Item Name="[data]">((Qt5Guid.dll!QImageData*)d)->data</Item>
            <Item Name="[stride]">((Qt5Guid.dll!QImageData*)d)->bytes_per_line</Item>
      If you always assume raster QPixmap objects, then you can also make a definition for QPixmap. Here is a sample entry for width:
            <Item Name="[width]">((Qt5Guid.dll!QImageData*)(((Qt5Guid.dll!QRasterPlatformPixmap*)(data.d))->image.d))->width</Item>
    • Hi John, 
      thanks a lot for your feedback and for sharing the visualizer!
    • Is there any way to support QImage::Format_Indexed8? i.e. Condition="(*(int*)(((char*)d)+48))==3". At least just showing it as an 8 bit gray scale image, disregarding the color map.
  • VS2013 Update4 not showing open cv image
    3 Posts | Last post April 01, 2015
    • Hi,
      I am using a Visual Studio 2013, update 4 & open CV with a very simple program that loads a png file into a open CV Mat object.
      In the image watch window the variable is shown & identified as cv::Mat but it is shown as invalid. Also when i hover the mouse over the variable the magnifying glass does not appear so I can not add it to the watch list.
      The thing is, this extension used to work and I found it very useful. I also have this problem with VS2010 & VS2012 too!
      Any suggestion as to how I might get this excellent extension working again?
      Many thanks
    • Hi RobinI1,
      sorry to hear that. Do you see this problem with all projects/solutions? Are you doing mixed-mode debugging by any chance (Windows Store App, C++/CLI project, ..)? Do you remember if you installed or updated VS or OpenCV since the last time it worked?
    • Hi Wolf,
      I first noticed it in a native C++ project. I then wrote a very simple native C++ project that only read in a png file and stored it in a cv::Mat object. Image Viewer does not work properly with both projects.
      I don't think I have done an update to VS but I did install open CV, but I don't know for sure if it worked before that or not.
  • Possible factor of [invalid] mat errors
    2 Posts | Last post March 31, 2015
    • I was debugging an opencl related routine when, suddenly, all of my Mat's became [invalid] on the Image Watch -- it simply stopped woring. It turns out I had a float variable named cv, and after renaming it to something else, the Image Watch started working again.
    • Hi Claudious,
      thanks so much for reporting this! This is a bug. 
      And it's a pretty interesting one. Here is what happens: to determine the width of a cv::Mat image at address, say, 0x123456, Image Watch uses Visual Studio's debug expression evaluator to evaluate an expression like this: ((cv::Mat*)0x123456)->cols. Now, if "cv" is a variable in the current scope, the expression evaluator returns an error: "name followed by '::' must be a class or namespace name". You can repro this by typing the above expression in the Visual Studio Watch window.
      It seems that casting to "::cv::Mat*" instead of "cv::Mat*" fixes the problem, although I haven't had the time to fully verify this. We'll hopefully have a fix for this soon.
      Thanks again for your feedback!
1 - 10 of 79 Items