Update grfmt_pxm.cpp
authortpoisonooo <khj.application@aliyun.com>
Tue, 7 Apr 2020 09:01:45 +0000 (17:01 +0800)
committerAlexander Smorkalov <alexander.smorkalov@xperience.ai>
Sat, 11 Apr 2020 14:41:51 +0000 (17:41 +0300)
remove comment in .ppm

modules/imgcodecs/src/grfmt_pxm.cpp

index c10f6fc..61252a9 100644 (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)
     {