Skip to content

feat: support GIF image decoding - #12

Merged
TorstenDittmann merged 2 commits into
appwrite:mainfrom
ganeshmshetty:feat/support-gif-format
Sep 14, 2026
Merged

TorstenDittmann merged 2 commits into
appwrite:mainfrom
ganeshmshetty:feat/support-gif-format

Conversation

@ganeshmshetty

Copy link
Copy Markdown
Contributor

Summary

  • Register Go's standard library _ "image/gif" format decoder in internal/imageutil.
  • Allow gif format in Decode, enabling both static and animated GIFs (using frame 0 for analysis).
  • Add rose.gif fixture (28 KB) generated from rose.png to automatically exercise multipart, raw, and truncated test coverage across fixtures_test.go.
  • Add unit tests in image_test.go covering static palette decoding and multi-frame animated GIF decoding.
  • Update README.md and CONTRIBUTING.md to reflect GIF format support.

Validation

  • make test passes with all packages green (cmd/autogravity, internal/imageutil, internal/gravity, internal/facedetection, internal/saliency).
  • Standard library only — introduces zero new third-party dependencies, CGO requirements, or Dockerfile modifications.

- register standard library image/gif decoder in imageutil
- support static and animated GIFs, extracting frame 0 for analysis
- add rose.gif test fixture and unit tests for static and animated GIFs
- update README and CONTRIBUTING documentation
@appwrite

appwrite Bot commented Sep 13, 2026

Copy link
Copy Markdown

Autogravity

Project ID: 6a9e5d640016fa6fb653

Sites (1)
Site Status Logs Preview QR
 Docs
autogravity-docs
Queued Queued Authorize Preview URL QR Code

Tip

Storage files get ClamAV malware scanning and encryption by default

@greptile-apps

greptile-apps Bot commented Sep 13, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no outstanding correctness, security, or repository-rule issues.

Summary

  • Allows GIF input through the existing validated image decoding path.
  • Verifies static GIF decoding and observable first-frame behavior for animated GIFs.
  • Adds a GIF fixture to existing integration-style image coverage.

Reviews (2) · Last reviewed commit: "test: verify animated GIF first-frame se..."

Comment thread internal/imageutil/image_test.go
- check distinguishing pixel in TestDecodeAnimatedGIF to verify frame 0 is selected
@ganeshmshetty

ganeshmshetty commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Hey I wanted to say this autogravity is a simple but great feature for someone to have!!
I noticed that this doesn't support gif. So this is slight addition to the already supporting image formats that my agent made.
Working: The first frame of the gif is taken as the reference for pin pointing the focal point.

I also noticed how multiple focal point in a same image was managed and I think it might be worth adding a rich api to handle these kind of issues, but also saw there was a pr referring to the same issue which made me think twice.

@TorstenDittmann
TorstenDittmann merged commit 6df8e77 into appwrite:main Sep 14, 2026
4 of 5 checks 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