We have a WebService with a method to upload images, this method accepts a byte array which is a TIFF.
On the client side the TIFF is loaded with Image.FromFile(path)
and then saved into a MemoryStream
. Then memoryStream.ToArray()
is called which results in a byte array which is used in the WebService request.
Currently we have a TIFF which is 130 KB big, but the total request size is almost 10 MB. How can this happen? Is this because the Image.FromFile
method converts (deflates) the TIFF to a standard format, so compression etc is lost? Is there a better way of doing this?
Thanks.