I have a method that returns a ByteArray array:
public byte[][] Draw(ImageFormat imageFormat, ImageSize imageSize);
and I need to write it to MemoryStream:
var byteArray = instanceName.Draw(ImageFormat.Jpeg, ImageSize.Dpi150);
MemoryStream ms = new MemoryStream(byteArray[0]);
This still works because the byteArray array has only one element. Can anyone point out and provide a solution: what happens if the byteArray has more than one element?
I assume that with the current code, I would still take the first byteArray element and discard the rest, but I need MemoryStreamit and it cannot accept a multidimensional array.
source
share