Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

png: apng support #100

Closed
wants to merge 5 commits into from
Closed

png: apng support #100

wants to merge 5 commits into from

Conversation

appashchenko
Copy link
Contributor

Возможность просматривать анимированные PNG, если в системе пропатчена libpng.

appashchenko and others added 5 commits November 27, 2023 20:44
libheif does not support animated avifs
Sync avifRGBImageAllocatePixels with github library version

Signed-off-by: Zetrin0 <pashchenko.a.o@yandex.com>
В примере из официальной репы память в цикле выделяется, но не чистится, а указатель зануляется.
Освобождаем в каждой итерации.

Signed-off-by: Zetrin0 <pashchenko.a.o@yandex.com>
@appashchenko
Copy link
Contributor Author

Набор для проверки
samples.tar.gz

@artemsen
Copy link
Owner

Зачем тут коммиты про AVIF? И зачем их вообще так много?

// buffer must be black and transparent at start
memset(output_buffer, 0, buffer_size);

for (png_uint_32 volatile frame_num = 0; frame_num < num_frames; frame_num++) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

volatile??

}
}

static int decode_png_frames(struct image* ctx, png_structp png, png_infop info)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Очень длинная функция, её бы на части разбить.
И код нужно пропустить через clang-format.

free(ctx->frames[i].data);
}

tmp = realloc(ctx->frames, 1 * sizeof(*ctx->frames));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем на 1 умножать?

@appashchenko
Copy link
Contributor Author

Извиняюсь, но я не знаю. Я не очень часто отправляю PR. Я думал, что PR смержится в один коммит.
Что я могу с этим сделать?

@artemsen
Copy link
Owner

Извиняюсь, но я не знаю. Я не очень часто отправляю PR. Я думал, что PR смержится в один коммит. Что я могу с этим сделать?

Нужно отребейзиться на текущий мастер и засквошить свои коммиты в один черезgit rebase -i

@appashchenko appashchenko closed this by deleting the head repository Dec 22, 2023
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.

None yet

2 participants