Hi,
I'm testing the library in a Xamarin.Forms project. I have a jpg image in my resources, and I want to encode it and get the encoded Stream.
In order to do that, I created an BlkImgDataSrc, then I get the byte array of the encodable source. Finally, I convert the byte array in a Stream.
The code:
var encodableSource = J2kImage.CreateEncodableSource(myStream);
var byteArray = J2kImage.ToBytes(encodableSource);
var encodedStream = new MemoryStream(byteArray);
I get an error in the first line: "System.ArgumentOutOfRangeException. Invalid image type Parameter name: streams".
Am I doing something wrong?
Note: I'm using CSJ2K 3.0.0.
Thanks in advance!
Hi,
I'm testing the library in a Xamarin.Forms project. I have a jpg image in my resources, and I want to encode it and get the encoded
Stream.In order to do that, I created an
BlkImgDataSrc, then I get the byte array of the encodable source. Finally, I convert the byte array in a Stream.The code:
var encodableSource = J2kImage.CreateEncodableSource(myStream);var byteArray = J2kImage.ToBytes(encodableSource);var encodedStream = new MemoryStream(byteArray);I get an error in the first line: "System.ArgumentOutOfRangeException. Invalid image type Parameter name: streams".
Am I doing something wrong?
Note: I'm using CSJ2K 3.0.0.
Thanks in advance!