Skip to content

get_image_metadata(): add GIF support - #1791

Draft
NicolasHug wants to merge 1 commit into
image_metadata_3_webpfrom
image_metadata_4_gif
Draft

NicolasHug wants to merge 1 commit into
image_metadata_3_webpfrom
image_metadata_4_gif

Conversation

@NicolasHug

Copy link
Copy Markdown
Contributor

Probed in C++ with giflib: we walk the records like DGifSlurp() but skip the image data instead of LZW-decoding it. GIF has no frame count in its header so every data sub-block must be visited, which C++ does ~3x faster than Python on large animated GIFs. Paths go through a FileIO-backed reader (DGifOpenFileName opens files in text mode on Windows).


Stack created with GitHub Stacks CLI • Give Feedback 💬

Probed in C++ with giflib: we walk the records like DGifSlurp() but skip the image data instead of LZW-decoding it. GIF has no frame count in its header so every data sub-block must be visited, which C++ does ~3x faster than Python on large animated GIFs. Paths go through a FileIO-backed reader (DGifOpenFileName opens files in text mode on Windows).
@pytorch-bot

pytorch-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1791

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (6 Unrelated Failures)

As of commit 52d04d7 with merge base ffb098a (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@NicolasHug
NicolasHug added this pull request to stack #1794 October 27, 2026 19:04
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant