mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Update grfmt_pxm.cpp
remove comment in .ppm
This commit is contained in:
parent
9c58a7cb1e
commit
b11a3a0820
@ -466,11 +466,9 @@ bool PxMEncoder::write(const Mat& img, const std::vector<int>& params)
|
|||||||
// write header;
|
// write header;
|
||||||
const int code = ((mode == PXM_TYPE_PBM) ? 1 : (mode == PXM_TYPE_PGM) ? 2 : 3)
|
const int code = ((mode == PXM_TYPE_PBM) ? 1 : (mode == PXM_TYPE_PGM) ? 2 : 3)
|
||||||
+ (isBinary ? 3 : 0);
|
+ (isBinary ? 3 : 0);
|
||||||
const char* comment = "# Generated by OpenCV " CV_VERSION "\n";
|
|
||||||
|
|
||||||
int header_sz = sprintf(buffer, "P%c\n%s%d %d\n",
|
int header_sz = sprintf(buffer, "P%c\n%d %d\n",
|
||||||
(char)('0' + code), comment,
|
(char)('0' + code), width, height);
|
||||||
width, height);
|
|
||||||
CV_Assert(header_sz > 0);
|
CV_Assert(header_sz > 0);
|
||||||
if (mode != PXM_TYPE_PBM)
|
if (mode != PXM_TYPE_PBM)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user