Point Image Serialization/Deserialization fails for in-memory Image
GitHub Issue #47, having set the ShapeDrawingOptions.Picture property to an in-memory Image, serializing the Picture property (via SaveLayerOptions) then restoring the Picture property (via LoadLayerOptions), the Image is not fully restored. This does not fail for disk-based Images.
Note that the same code is executed when doing a simple Image.Serialize, then Image.Deserialize, as in
string s = img.Serialize(true);
The data buffer for in-memory images was being calculated as Width x Height x 3 (presumably for RGB components) and instead should have been Width x Height x 4 (to include the alpha component, ARGB).
Additionally, the image type was getting changed from istInMemory to istGDIPlus after being loaded. As a result, if the layer options were saved/restored a second time, an exception was thrown.