mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge branch 4.x
This commit is contained in:
@@ -143,6 +143,7 @@ AvifDecoder::AvifDecoder() {
|
||||
m_buf_supported = true;
|
||||
channels_ = 0;
|
||||
decoder_ = avifDecoderCreate();
|
||||
decoder_->strictFlags = AVIF_STRICT_DISABLED;
|
||||
}
|
||||
|
||||
AvifDecoder::~AvifDecoder() {
|
||||
@@ -166,6 +167,7 @@ bool AvifDecoder::checkSignature(const String &signature) const {
|
||||
std::unique_ptr<avifDecoder, decltype(&avifDecoderDestroy)> decoder(
|
||||
avifDecoderCreate(), avifDecoderDestroy);
|
||||
if (!decoder) return false;
|
||||
decoder->strictFlags = AVIF_STRICT_DISABLED;
|
||||
OPENCV_AVIF_CHECK_STATUS(
|
||||
avifDecoderSetIOMemory(
|
||||
decoder.get(), reinterpret_cast<const uint8_t *>(signature.c_str()),
|
||||
|
||||
@@ -1096,7 +1096,6 @@ INSTANTIATE_TEST_CASE_P(AllModes, Imgcodecs_Tiff_Modes, testing::ValuesIn(all_mo
|
||||
TEST(Imgcodecs_Tiff_Modes, write_multipage)
|
||||
{
|
||||
const string root = cvtest::TS::ptr()->get_data_path();
|
||||
const string filename = root + "readwrite/multipage.tif";
|
||||
const string page_files[] = {
|
||||
"readwrite/multipage_p1.tif",
|
||||
"readwrite/multipage_p2.tif",
|
||||
@@ -1109,7 +1108,7 @@ TEST(Imgcodecs_Tiff_Modes, write_multipage)
|
||||
vector<Mat> pages;
|
||||
for (size_t i = 0; i < page_count; i++)
|
||||
{
|
||||
const Mat page = imread(root + page_files[i]);
|
||||
const Mat page = imread(root + page_files[i], IMREAD_REDUCED_GRAYSCALE_8 + (int)i);
|
||||
pages.push_back(page);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user