I have a new CodeProject article up which details how to make a Debugger Visualizer in the case where you need to custom serialize the object. The actual classes I build in the tutorial are only useful with our DotImage project line. However, the process of creating a Custom Serializer should be useful to any .NET developer.

 

Debugger Visualizer

 

In our case, we automatically serialize AtalaImages to PNG format by default. It turns out that PNG encoding and decoding is slow enough that visualizing a medium sized image would cause Visual Studio to time out. I didn't have the option of changing our default serialization process as it would have a huge impact on our customers, some of which have databases full of already serialized AtalaImages.

 

What I ended up doing was making a Custom Serializer which serializes the AtalaImage into a bitmap instead of a PNG (a process which is pretty much a row by row copy). This sped things up enough so that now just about any image works.