Matt Van Horn a6d466dcec Merge pull request #29407 from mvanhorn:fix/29365-imwrite-boolean-image-support
feat: support boolean (CV_Bool) images in imwrite - #29407

## Summary
`imwrite` failed on `CV_Bool` (boolean) images because no encoder handles that depth. This normalizes a boolean image to `CV_8U` (mapping true to 255) before encoding, so boolean masks can be written directly instead of requiring a manual `convertTo` at every call site.

Adds round-trip tests covering boolean-image encoding.

Fixes #29365

AI was used for assistance.
2026-08-26 12:10:29 +03:00
2026-07-28 20:27:29 +05:30
2026-07-28 20:27:29 +05:30
2018-10-11 17:57:51 +00:00
2025-08-07 10:35:20 +03:00
2024-04-02 16:39:54 +03:00

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.

Additional Resources

Languages
C++ 86%
Python 4.1%
C 2.9%
CMake 2.2%
Java 1.6%
Other 3.1%