Skip to content

Add plMipmap::CompressJPEG().#306

Merged
zrax merged 1 commit into
H-uru:masterfrom
Hoikas:compress_jpeg
Sep 5, 2025
Merged

Add plMipmap::CompressJPEG().#306
zrax merged 1 commit into
H-uru:masterfrom
Hoikas:compress_jpeg

Conversation

@Hoikas
Copy link
Copy Markdown
Member

@Hoikas Hoikas commented Sep 5, 2025

This adds an easy way to actually cause mipmaps with JPEG compression to actually its content. The implementation largely mirrors what Cyan does... If RLE can get the image down below 5KB, then don't compress. Otherwise, compress to jpeg.

This is especially useful for Python apps where plJPEG::CompressImage() still doesn't have bindings.

Comment thread core/Stream/hsNullStream.h Outdated
Comment thread core/Stream/hsNullStream.cpp
Comment thread core/PRP/Surface/plMipmap.cpp Outdated
Comment thread core/PRP/Surface/plMipmap.cpp Outdated
Comment thread core/PRP/Surface/plMipmap.cpp Outdated
This adds an easy way to actually cause mipmaps with JPEG compression to
actually its content. The implementation largely mirrors what Cyan
does... If RLE can get the image down below 5KB, then don't compress.
Otherwise, compress to jpeg.

This is especially useful for Python apps where plJPEG::CompressImage()
still doesn't have bindings.
@zrax zrax merged commit 5e1483b into H-uru:master Sep 5, 2025
10 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