ToByteArray encodes the image and returns the bytes. You should not do this multiple times without changing the image. You could call the method like you do now but preserve the result and write that to a file with File.WriteAllBytes.
↧