Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Detect HEIC/HEIF format by checking header bytes #109

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

CORDEA
Copy link
Contributor

@CORDEA CORDEA commented Dec 2, 2023

Hi, thank you to this useful package and its maintainers 🙌

HEIC/HEIF format is already supported in #58, but I want to enhance this detection by checking the header bytes. I have referred to the following documents.

The header bytes look like this:

  • image/heif
    • 0x0, 0x0, 0x0, 0x18, 0x66, 0x74, 0x79, 0x70, 0x6d, 0x69, 0x66, 0x31, 0x0, ...
    • ... f, t, y, p, m, i, f, 1 ...
  • image/heic
    • 0x0, 0x0, 0x0, 0x18, 0x66, 0x74, 0x79, 0x70, 0x68, 0x65, 0x69, 0x63, 0x0, ...
    • ... f, t, y, p, h, e, i, c ...

Also, with this and #58, I think dart-lang/tools#401 can be closed.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Copy link
Contributor

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

Thanks for the update to the changelog and the tests!

@devoncarew devoncarew merged commit 56359b0 into dart-archive:master Dec 4, 2023
5 checks passed
mosuem pushed a commit to dart-lang/tools that referenced this pull request Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants