G
Guest
I have a byte array of 24-bit image data. I want to compress the data as jpg
and write it to a stream. Is there any easy and fast way to do this in C#?
byte[] rawImageData = new byte[width*height *3];
// imagedata is filled with rgb pixel info
byte[] jpgImageData = ??? // compressed rawImageData (with header)
myStream.Write(jpgImageData);
and write it to a stream. Is there any easy and fast way to do this in C#?
byte[] rawImageData = new byte[width*height *3];
// imagedata is filled with rgb pixel info
byte[] jpgImageData = ??? // compressed rawImageData (with header)
myStream.Write(jpgImageData);