Merge pull request #462 from kobigurk:master
authorAndrey Kamaev <andrey.kamaev@itseez.com>
Wed, 27 Feb 2013 20:38:20 +0000 (00:38 +0400)
committerOpenCV Buildbot <buildbot@opencv.org>
Wed, 27 Feb 2013 20:38:20 +0000 (00:38 +0400)
1  2 
modules/highgui/src/grfmt_tiff.cpp
modules/highgui/src/grfmt_tiff.hpp
modules/highgui/test/test_grfmt.cpp

Simple merge
Simple merge
@@@ -99,11 -99,14 +99,14 @@@ public
                  {
                      if(ext_from_int(ext).empty())
                          continue;
-                     for (int num_channels = 1; num_channels <= 3; num_channels+=2)
+                     for (int num_channels = 1; num_channels <= 4; num_channels++)
                      {
+                         if (num_channels == 2) continue;
+                         if (num_channels == 4 && ext!=3 /*TIFF*/) continue;
                          ts->printf(ts->LOG, "image type depth:%d   channels:%d   ext: %s\n", CV_8U, num_channels, ext_from_int(ext).c_str());
                          Mat img(img_r * k, img_c * k, CV_MAKETYPE(CV_8U, num_channels), Scalar::all(0));
 -                        circle(img, Point2i((img_c * k) / 2, (img_r * k) / 2), cv::min((img_r * k), (img_c * k)) / 4 , Scalar::all(255));
 +                        circle(img, Point2i((img_c * k) / 2, (img_r * k) / 2), std::min((img_r * k), (img_c * k)) / 4 , Scalar::all(255));
  
                          string img_path = cv::tempfile(ext_from_int(ext).c_str());
                          ts->printf(ts->LOG, "writing      image : %s\n", img_path.c_str());