سلام من کد زیر را نوشتم و کلی warning می گیریم آیا کسی راه حلی سراغ داره برای غیر فعال سازی این warning ها؟
void read(const std::string& filename, std::vector<cv::Mat>& images)
{
images.clear();
TIFF* tiff = TIFFOpen(filename.c_str(), "r");
if (tiff) {
do {
uint32 width, height;
size_t npixels;
uint32* raster;
TIFFGetField(tiff, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(tiff, TIFFTAG_IMAGELENGTH, &height);
npixels = width * height;
raster = (uint32*)_TIFFmalloc(npixels * sizeof(uint32));
if (raster != NULL) {
if (TIFFReadRGBAImage(tiff, width, height, raster, 0)) {
cv::Mat img(height, width, CV_8UC4, raster);
cv::Mat flipped = cv::Mat::zeros(height, width, CV_8UC4);
for (int y = 0; y < height; ++y) {
memcpy(flipped.ptr<uint8_t>(y), img.ptr<uint8_t>(height - y - 1), width * 4);
}
cv::cvtColor(flipped, img, cv::COLOR_RGBA2BGR);
images.push_back(img);
}
_TIFFfree(raster);
}
} while (TIFFReadDirectory(tiff));
TIFFClose(tiff);
}
}
warning :
TIFFOpen TIFFReadDirectory: Warning, Unknown field with tag 20624 (0x5090) encountered