Skip to content

Add PAG export support in viewer: PNG sequence, single frame PNG and APNG formats#2755

Merged
shlzxjp merged 42 commits intoTencent:mainfrom
CodeJhF:build_viewer
Apr 8, 2025
Merged

Add PAG export support in viewer: PNG sequence, single frame PNG and APNG formats#2755
shlzxjp merged 42 commits intoTencent:mainfrom
CodeJhF:build_viewer

Conversation

@CodeJhF
Copy link
Collaborator

@CodeJhF CodeJhF commented Apr 1, 2025

1、viewer支持将pag文件导出为png序列帧
2、viewer支持将pag文件的某一帧导出为png文件
3、viewer支持将pag文件导出为apng文件

CodeJhF and others added 30 commits March 17, 2025 10:37
if (extraParams.contains("exportFrame")) {
exportFrame = extraParams.value("exportFrame").toInt();
}
task = new PAGExportPNGTask(pagFile, path, exportFrame);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这里只new创建了task,没有释放是因为在qml将task与progressWindow的task属性绑定起来了,当progressWindow的task变化时,会在后续的某个时间点自动释放task

}

auto PAGExportAPNGTask::onFrameFlush(double progress) -> void {
PAGExportPNGTask::onFrameFlush(progress * 0.9);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这里将progress*0.9是因为导出apng之前是先将pag文件导出为png序列帧,然后再将png合并为apng,剩下的0.1的进度会在合并apng完毕之后补齐

@codecov-commenter
Copy link

codecov-commenter commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.37%. Comparing base (beda077) to head (64ba351).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2755      +/-   ##
==========================================
- Coverage   77.40%   77.37%   -0.04%     
==========================================
  Files         419      419              
  Lines       22270    22270              
  Branches     6366     6366              
==========================================
- Hits        17239    17232       -7     
- Misses       3777     3778       +1     
- Partials     1254     1260       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个文件可以不用review,是直接嵌入的第三方库源码,只简单的修改了一下

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个文件可以不用review,是直接嵌入的第三方库源码,只简单的修改了一下

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个文件可以不用review,是直接嵌入的第三方库源码,只简单的修改了一下

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个文件可以不用review,是直接嵌入的第三方库源码,只简单的修改了一下

@shlzxjp shlzxjp merged commit 2ba4e19 into Tencent:main Apr 8, 2025
8 checks passed
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.

3 participants