1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

GIF APNG WEBP AVIF revisions

This commit is contained in:
Suleyman TURKMEN
2025-01-03 14:25:31 +03:00
parent 0538e64b13
commit b4d0325666
10 changed files with 210 additions and 109 deletions
-15
View File
@@ -303,21 +303,6 @@ bool AvifEncoder::write(const Mat &img, const std::vector<int> &params) {
return writemulti(img_vec, params);
}
bool AvifEncoder::writemulti(const std::vector<Mat> &img_vec,
const std::vector<int> &params) {
CV_LOG_INFO(NULL, "Multi page image will be written as animation with 1 second frame duration.");
Animation animation;
animation.frames = img_vec;
for (size_t i = 0; i < animation.frames.size(); i++)
{
animation.durations.push_back(1000);
}
return writeanimation(animation, params);
}
bool AvifEncoder::writeanimation(const Animation& animation,
const std::vector<int> &params) {
int bit_depth = 8;