Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2020-04-13 20:00:12 +00:00
78 changed files with 192 additions and 53 deletions
+2 -4
View File
@@ -466,11 +466,9 @@ bool PxMEncoder::write(const Mat& img, const std::vector<int>& params)
// write header;
const int code = ((mode == PXM_TYPE_PBM) ? 1 : (mode == PXM_TYPE_PGM) ? 2 : 3)
+ (isBinary ? 3 : 0);
const char* comment = "# Generated by OpenCV " CV_VERSION "\n";
int header_sz = sprintf(buffer, "P%c\n%s%d %d\n",
(char)('0' + code), comment,
width, height);
int header_sz = sprintf(buffer, "P%c\n%d %d\n",
(char)('0' + code), width, height);
CV_Assert(header_sz > 0);
if (mode != PXM_TYPE_PBM)
{