/// <summary> /// Used for serialization /// </summary> /// <param name="info"></param> /// <param name="context"></param> public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("Width", Width); info.AddValue("Height", Height); info.AddValue("BitsPerPixel", BitsPerPixel); info.AddValue("PixelType", PixelType); info.AddValue("PlaneSizes", PlaneSizes); info.AddValue("Pitches", Pitches); info.AddValue("Lines", Lines); info.AddValue("NumberOfPlanes", NumberOfPlanes); PixelData px = new PixelData(this.PlaneSizes, this.Planes); info.AddValue("PixelData", px.Save()); }