Not able to get byte array from Signature pad image , throwing exception

public static void ImageSerialzationAsync(Stream img)

                var signatureMemoryStream = new MemoryStream();
                byte[] data = signatureMemoryStream.ToArray();


Exception message is Cannot access a closed Stream. as per below . Please let me know any suggestions stuck with this for few hours
System.ObjectDisposedException: Cannot access a closed Stream.
at System.IO.Stream.CopyTo (System.IO.Stream destination)

Sign In or Register to comment.