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

LibGfx+LibCompress: Add a GIF encoder #24191

Merged
merged 8 commits into from May 14, 2024

Conversation

LucasChollet
Copy link
Member

This version is really barebone as it does not support colors (only
black and white) or animated images.

image

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label May 3, 2024
Copy link
Collaborator

@nico nico left a comment

Choose a reason for hiding this comment

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

Seems like a nice start!

Maybe worth having a test that tests that a black-and-white bitmap roundtrips ok through gif writer followed by gif loader?

Userland/Utilities/image.cpp Show resolved Hide resolved
Userland/Libraries/LibCompress/LZW.h Outdated Show resolved Hide resolved
Userland/Libraries/LibCompress/LZW.h Outdated Show resolved Hide resolved
Userland/Libraries/LibCompress/LZW.h Outdated Show resolved Hide resolved
@nico
Copy link
Collaborator

nico commented May 5, 2024

Maybe worth having a test that tests that a black-and-white bitmap roundtrips ok through gif writer followed by gif loader?

I added a roundtrip test for webp to #24212. Adding a gif roundtrip test for that should be maybe 8 lines of code. (It would be 4 if you didn't have to convert the built-in test bitmaps to black-and-white.)

@nico
Copy link
Collaborator

nico commented May 7, 2024

(Maybe you forgot to git push?)

@LucasChollet
Copy link
Member Author

(Nah I'm fighting the roundtrip test I just added 😅)

Userland/Libraries/LibCompress/LZWDecoder.h Outdated Show resolved Hide resolved
Userland/Libraries/LibGfx/ImageFormats/GIFLoader.cpp Outdated Show resolved Hide resolved
Tests/LibCompress/CMakeLists.txt Outdated Show resolved Hide resolved
Userland/Libraries/LibCompress/LZW.h Outdated Show resolved Hide resolved
Userland/Libraries/LibCompress/LZW.h Outdated Show resolved Hide resolved
@LucasChollet
Copy link
Member Author

It should be all good now!

Copy link
Member

@timschumi timschumi left a comment

Choose a reason for hiding this comment

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

One large round of feedback, but I think that's all that we need.

Tests/LibGfx/TestImageWriter.cpp Outdated Show resolved Hide resolved
Tests/LibGfx/TestImageWriter.cpp Outdated Show resolved Hide resolved
Tests/LibCompress/TestLzw.cpp Outdated Show resolved Hide resolved
Tests/LibCompress/TestLzw.cpp Outdated Show resolved Hide resolved
Userland/Libraries/LibCompress/Lzw.h Show resolved Hide resolved
Tests/LibGfx/TestImageWriter.cpp Outdated Show resolved Hide resolved
Userland/Libraries/LibGfx/ImageFormats/GIFWriter.cpp Outdated Show resolved Hide resolved
Userland/Libraries/LibGfx/ImageFormats/GIFWriter.cpp Outdated Show resolved Hide resolved
Userland/Libraries/LibGfx/ImageFormats/GIFWriter.cpp Outdated Show resolved Hide resolved
Userland/Libraries/LibGfx/ImageFormats/GIFWriter.cpp Outdated Show resolved Hide resolved
This version is really barebone as it does not support colors (only
black and white) or animated images.
@ADKaster ADKaster merged commit cd486a7 into SerenityOS:master May 14, 2024
12 checks passed
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label May 14, 2024
@LucasChollet LucasChollet deleted the gif_writer branch May 14, 2024 21:52
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.

None yet

4 participants