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

Add missing functions to read PNGs and JPGs. #255

Merged
merged 10 commits into from
Mar 7, 2024

Conversation

Deledrius
Copy link
Member

This adds the previously-unimplemented JPEG writer, as well as two new functions to read PNG and JPG files directly into a plMipmap. The existing readers were intended to be used only when reading from a data stream where the size of the buffer is already known by the calling function, and as such are inconvenient when reading directly from a file.

Depends on #127.

@Deledrius
Copy link
Member Author

For some reason Mac homebrew's libjpeg-turbo is failing in the CI. I've checked my own install, and the version installed by homebrew has the necessary #defines in the library header. I'm not sure what the problem is here.

core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plPNG.cpp Outdated Show resolved Hide resolved
core/Util/plPNG.cpp Outdated Show resolved Hide resolved
@Deledrius
Copy link
Member Author

I've added the commit from #256 so that this PR can successfully build.

core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.cpp Outdated Show resolved Hide resolved
core/Util/plJPEG.h Show resolved Hide resolved
core/Util/plPNG.cpp Outdated Show resolved Hide resolved
core/Util/plPNG.h Show resolved Hide resolved
@Deledrius Deledrius force-pushed the image_functions branch 2 times, most recently from 6d4afad to 438ec7d Compare March 6, 2024 06:23
Deledrius and others added 10 commits March 5, 2024 22:29
Apply suggestions from code review.

Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
Apply suggestions from code review.

Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
Apply suggestions from code review.

Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
Apply suggestions from code review.

Co-authored-by: Michael Hansen <zrax0111@gmail.com>
Apply suggestions from code review.

Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
@Deledrius
Copy link
Member Author

This PR has been rebased onto master and review suggestions have been incorporated.

@zrax zrax merged commit e043a0e into H-uru:master Mar 7, 2024
8 checks passed
@Deledrius Deledrius deleted the image_functions branch March 7, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants