public static Stream SaveAsStream(this IPictureWriter target, IPicture picture) { if (target == null) { return(null); } var bytes = target.SaveAsBytes(picture); return(new MemoryStream(bytes)); }
public static string SaveAsBase64(this IPictureWriter target, IPicture picture) { if (target == null) { return(null); } var bytes = target.SaveAsBytes(picture); return(Convert.ToBase64String(bytes)); }