mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Update documentation of imwrite()
This commit is contained in:
committed by
sturkmen72
parent
5a7045181a
commit
2566d13100
@@ -204,16 +204,17 @@ can be saved using this function, with these exceptions:
|
||||
- PNG images with an alpha channel can be saved using this function. To do this, create
|
||||
8-bit (or 16-bit) 4-channel image BGRA, where the alpha channel goes last. Fully transparent pixels
|
||||
should have alpha set to 0, fully opaque pixels should have alpha set to 255/65535 (see the code sample below).
|
||||
- Multiple images (vector of Mat) can be saved in TIFF format (see the code sample below).
|
||||
|
||||
If the format, depth or channel order is different, use
|
||||
Mat::convertTo and cv::cvtColor to convert it before saving. Or, use the universal FileStorage I/O
|
||||
functions to save the image to XML or YAML format.
|
||||
|
||||
The sample below shows how to create a BGRA image and save it to a PNG file. It also demonstrates how to set custom
|
||||
compression parameters:
|
||||
The sample below shows how to create a BGRA image, how to set custom compression parameters and save it to a PNG file.
|
||||
It also demonstrates how to save multiple images in a TIFF file:
|
||||
@include snippets/imgcodecs_imwrite.cpp
|
||||
@param filename Name of the file.
|
||||
@param img Image to be saved.
|
||||
@param img (Mat or vector of Mat) Image or Images to be saved.
|
||||
@param params Format-specific parameters encoded as pairs (paramId_1, paramValue_1, paramId_2, paramValue_2, ... .) see cv::ImwriteFlags
|
||||
*/
|
||||
CV_EXPORTS_W bool imwrite( const String& filename, InputArray img,
|
||||
|
||||
Reference in New Issue
Block a user