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

feat: disable tiff picture auto transform #137

Merged
merged 1 commit into from
May 27, 2024

Conversation

rb-union
Copy link
Contributor

禁用TIFF图片自动根据EXIF信息旋转;
且由于 libqtiff 插件缓存的旋转信息可能错误,
缓存数据会导致内存占用升高,调整为每次读取
TIFF图片数据。

Log: 调整TIFF图片默认展示效果
Influence: ImageView Print

禁用TIFF图片自动根据EXIF信息旋转;
且由于 libqtiff 插件缓存的旋转信息可能错误,
缓存数据会导致内存占用升高,调整为每次读取
TIFF图片数据。

Log: 调整TIFF图片默认展示效果
Influence: ImageView Print
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • PrintImageLoaderLibImageGraphicsView中,使用setAutoTransform(false)会导致图片旋转信息不正确,因为这会跳过Qt的图片缓存机制,建议使用setTransformationMode(Qt::TransformationMode::FastTransformation)来跳过旋转处理,或者在QImageReaderQImage之间进行适当的旋转调整。
  • PrintImageLoader中,注释掉的代码reader.setAutoTransform(true);表明原始代码可能是根据EXIF信息自动旋转图片的,但当前的修改破坏了这种功能,应该根据实际情况决定是否需要这个功能。
  • LibImageGraphicsView中,FIXME注释表明临时修改了TIFF图片的加载方式,以避免内存占用过高,这是一个合理的临时解决方案,但应该在代码库中记录下来,以便未来可能的优化。

合并相似的问题是否建议立即修改:

  • 应该恢复PrintImageLoader中的EXIF旋转信息处理功能,或者提供一种新的机制来处理TIFF图片的旋转信息。
  • 应该在代码库中添加相应的注释,说明为什么需要临时修改TIFF图片的加载方式,以及未来的改进计划。
  • 考虑使用QImageReaderQImage之间的缓存机制来避免重复读取和旋转处理,以优化性能。

Copy link
Contributor

@starhcq starhcq left a comment

Choose a reason for hiding this comment

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

/+1

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rb-union, starhcq

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@myk1343
Copy link
Contributor

myk1343 commented May 27, 2024

[是否满足兼容性要求] Y
[是否满足commit提交规范] Y
[是否满足编码规范] Y
[Review结论] Pass
[Fail原因] N/A

@rb-union rb-union merged commit 1033936 into linuxdeepin:feat_tiff May 27, 2024
17 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.

4 participants