[CSHARP-355] serialize the image data type Created: 10/Nov/11  Updated: 02/Apr/15  Resolved: 16/Dec/11

Status: Closed
Project: C# Driver
Component/s: Feature Request
Affects Version/s: 1.3
Fix Version/s: 1.4

Type: New Feature Priority: Major - P3
Reporter: Wladimir Ferreira Junior Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I'd like to serialize the image data type



 Comments   
Comment by Robert Stam [ 16/Dec/11 ]

Implemented support for Image and Bitmap. Decided NOT to support Metafile for now. I don't think Metafile is used much so probably no one will be disappointed. Please comment if you have a need for Metafile.

Comment by Robert Stam [ 18/Nov/11 ]

Here's the proposed serialization. Image is an abstract base class with two concrete subclasses: Bitmap and Metafile, so we will have to support all 3. If the nominal type is Image, then Serialize will write a discriminator value so that Deserialize can know which concrete subclass to deserialize. The serialized form would look like:

{ _t : "Bitmap", image : BinData(0, ...) }
or
{ _t : "Metafile", metafile: BinData(0, ....) }

If the nominal type is Bitmap or Metafile then no discriminator is needed and the Bitmap or Metafile will simply be serialized as a binary value.

Comment by Wladimir Ferreira Junior [ 10/Nov/11 ]

Yes, I'm talking about System.Drawing.Image

Comment by Robert Stam [ 10/Nov/11 ]

I assume you mean System.Drawing.Image?

The other classes called Image are all controls which don't seem suitable for serializing.

Someone commented on Google Groups that Image might not be suitable for serializing, so the first step will be to determine whether this is feasible.

Generated at Wed Feb 07 21:36:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.