Skip to content

[imgcodecs] fix to supported depth for TIFF  #26509

@Kumataro

Description

@Kumataro

Describe the doc issue

At document, TIFF encoder supports 'CV_8U', 'CV_16U' and 'CV_32F'.

https://docs.opencv.org/4.x/d4/da8/group__imgcodecs.html#ga8ac397bd09e48851665edbe12aa28f25

With TIFF encoder, 8-bit unsigned (CV_8U), 16-bit unsigned (CV_16U), 32-bit float (CV_32F) and 64-bit float (CV_64F) images can be saved.

However TIFF Encoder supports CV_8S, CV_16S, CV_32S and CV_64F too,

bool TiffEncoder::isFormatSupported( int depth ) const
{
return depth == CV_8U || depth == CV_8S || depth == CV_16U || depth == CV_16S || depth == CV_32S || depth == CV_32F || depth == CV_64F;
}

Fix suggestion

With TIFF encoder, 8-bit unsigned (CV_8U), 8-bit signed (CV_8S), 16-bit unsigned (CV_16U), 16-bit signed (CV_16S), 32-bit signed (CV_32S), 32-bit float (CV_32F) and 64-bit float (CV_64F) images can be saved.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions