..note::``cvEncodeImage`` returns single-row matrix of type ``CV_8UC1`` that contains encoded image as array of bytes.
imread
----------
------
Loads an image from a file.
..ocv:function:: Mat imread( const string& filename, int flags=1 )
@ -85,7 +85,8 @@ Loads an image from a file.
* **=0** Return a grayscale image
* **<0** Return the loaded image as is. Note that in the current implementation the alpha channel, if any, is stripped from the output image. For example, a 4-channel RGBA image is loaded as RGB if :math:`flags\ge0` .
* **<0** Return the loaded image as is.
..note:: In the current implementation the alpha channel, if any, is stripped from the output image.
The function ``imread`` loads an image from the specified file and returns it. If the image cannot be read (because of missing file, improper permissions, unsupported or invalid format), the function returns an empty matrix ( ``Mat::data==NULL`` ). Currently, the following file formats are supported: