H-uru / libhsplasma

Cross-platform Plasma data and network library
GNU General Public License v3.0
32 stars 30 forks source link

Add missing functions to read PNGs and JPGs. #255

Closed Deledrius closed 7 months ago

Deledrius commented 2 years ago

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 commented 2 years ago

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.

Deledrius commented 2 years ago

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

Deledrius commented 7 months ago

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