Ask Your Question

Revision history [back]

This code compresses an image (Mat) to jpg, and returns that as a byte array.

The byteArray will be 300 x 400 x number of channels.

Or you can just use byteArray.length in order to find out.