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

Downscale pasted PNG images based on metadata (#29123) #29304

Closed
wants to merge 1 commit into from

Conversation

silverwind
Copy link
Member

Backport #29123 to 1.21.

Some images like MacOS screenshots contain
pHYs data which we can use to downscale uploaded images so they render in the same dppx ratio in which they were taken.

Before:

image

After:

image

Some images like MacOS screenshots contain
[pHYs](http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.div.8)
data which we can use to downscale uploaded images so they render in the
same dppx ratio in which they were taken.

Before:

<img width="584" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/50979e3a-5d5a-40dc-a0a4-36eb6e28f14a">

After:

<img width="329" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/0690902a-f2fe-4c6b-97b3-6fdd67c21bad">
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Feb 21, 2024
@GiteaBot GiteaBot added this to the 1.21.6 milestone Feb 21, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 21, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 21, 2024
@silverwind
Copy link
Member Author

Ah, can not backport easily because of BigInt requirement.

@silverwind silverwind closed this Feb 21, 2024
@silverwind silverwind deleted the backport-29123 branch February 21, 2024 21:31
@GiteaBot GiteaBot removed this from the 1.21.6 milestone Feb 22, 2024
Copy link

github-actions bot commented Mar 1, 2024

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants