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

Feature request: Export function for png signature check #30

Closed
dotKokott opened this issue May 24, 2023 · 1 comment · Fixed by #36
Closed

Feature request: Export function for png signature check #30

dotKokott opened this issue May 24, 2023 · 1 comment · Fixed by #36

Comments

@dotKokott
Copy link

It would be great if the library would export a isPng(data: ImageData) : boolean function that does the png signature check (which is already happening internally)

This way I could avoid catching the error when trying to decode a non-png and just check pre-emptively.

@targos
Copy link
Member

targos commented May 25, 2023

SGTM. Would you like to make a PR?

targos added a commit that referenced this issue Feb 10, 2024
targos added a commit that referenced this issue Feb 10, 2024
targos added a commit that referenced this issue Feb 10, 2024
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 a pull request may close this issue.

2 participants