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

Add physical pixel size handling for PNG. #675

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

tdenniston
Copy link
Contributor

This implements support for the 'pHYs' chunk in the standard PNG format specification, controlling the intended physical pixel size. The physical pixel size (often specified in DPI) influences the displayed size of the image for viewers that implement it.

One usecase for this functionality is encoding HiDPI (e.g. 2x, 4x) images for display on Apple Retina displays.

This implements support for the 'pHYs' chunk in the standard PNG format
specification, controlling the intended physical pixel size. The
physical pixel size (often specified in DPI) influences the displayed
size of the image for viewers that implement it.

One usecase for this functionality is encoding HiDPI (e.g. 2x, 4x)
images for display on Apple Retina displays.
@brendan-duncan
Copy link
Owner

This looks good. Thanks!

@brendan-duncan brendan-duncan merged commit a7b051e into brendan-duncan:main Aug 27, 2024
1 check 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.

2 participants