From 488ae9dd6ee1c5491569c05818156349c4c82914 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Tue, 24 Apr 2012 12:54:49 +0000 Subject: [PATCH] corrected typo (ticket #1843). added note about imdecode & imencode --- doc/user_guide/ug_mat.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/user_guide/ug_mat.rst b/doc/user_guide/ug_mat.rst index 4c597d5ad1..f4a75eada5 100644 --- a/doc/user_guide/ug_mat.rst +++ b/doc/user_guide/ug_mat.rst @@ -18,9 +18,15 @@ If you read a jpg file, a 3 channel image is created by default. If you need a g Mat img = imread(filename, 0); +.. note:: format of the file is determined by its content (first few bytes) + Save an image to a file: :: - Mat img = imwrite(filename); + imwrite(filename, img); + +.. note:: format of the file is determined by its extension. + +.. note:: use ``imdecode`` and ``imencode`` to read and write image from/to memory rather than a file. XML/YAML --------