Skip to content

Fix OpenCV warning: "imwrite_ An unsupported key(1) was specified and has been ignored."#1917

Merged
fspindle merged 1 commit intolagadic:masterfrom
s-trinh:fix_writeOpenCV_cv_warning
Feb 27, 2026
Merged

Fix OpenCV warning: "imwrite_ An unsupported key(1) was specified and has been ignored."#1917
fspindle merged 1 commit intolagadic:masterfrom
s-trinh:fix_writeOpenCV_cv_warning

Conversation

@s-trinh
Copy link
Copy Markdown
Contributor

@s-trinh s-trinh commented Feb 27, 2026

Currently when doing:

  vpImage<unsigned char> I_save(50, 50);
  vpImageIo::write(I_save, "save_png.png");
  vpImage<vpRGBa> I_save_color(50, 50);
  vpImageIo::write(I_save, "save_color_png.png");

OpenCV prints the following warning:

[ WARN:0@0.035] global loadsave.cpp:1140 imwrite_ An unsupported key(1) was specified and has been ignored.

Only when saving a jpeg image the "cv::IMWRITE_JPEG_QUALITY" flag must be passed to cv::imwrite().

[ WARN:0@0.035] global loadsave.cpp:1140 imwrite_ An unsupported key(1) was specified and has been ignored.

Only when saving a jpeg image the "cv::IMWRITE_JPEG_QUALITY" flag must be passed to cv::imwrite().
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.68%. Comparing base (392f312) to head (b03c98f).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
modules/io/src/image/vpImageIo.cpp 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1917      +/-   ##
==========================================
- Coverage   48.73%   48.68%   -0.06%     
==========================================
  Files         532      532              
  Lines       69293    69293              
  Branches    32403    32403              
==========================================
- Hits        33770    33735      -35     
+ Misses      24977    24976       -1     
- Partials    10546    10582      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fspindle fspindle merged commit 49f26f8 into lagadic:master Feb 27, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants