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 lossless transform #216

Open
eugenesvk opened this issue Jul 21, 2024 · 2 comments
Open

Add lossless transform #216

eugenesvk opened this issue Jul 21, 2024 · 2 comments

Comments

@eugenesvk
Copy link

Jpeg has this fantastic option to do some image transformations losslessly, mostly rotate and crop (well, beyond the loss of the data you crop out :))
Would be great if Zune image woud be able to losslessly manipulate jpegs

(this would also help some fully replace turbojpeg with your great memory-safe library woelper/oculante#264)

@etemesi254
Copy link
Owner

This would be fantastic to have, but it's not that easy in the face value.

The problems are also pointed out in libjpeg-turbo at https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/transupp.h

But basically, jpeg images have very weird scaling factors that make for a lot of problems,the decoder is written in a certain manner that handles this, with some hacks to handle esoteric configurations, the code is complex, complicated and full of long explanations of why things are like that, and without care will break,(it does sometimes, see the other issues relating to jpeg), and I am generally right now against adding new features unless either wanted by a large majority or sometimes sponsored.

But in case there is a big need for this, I can guide one on where to write hooks that can enable this, further discussion is welcome

@lilith
Copy link

lilith commented Sep 9, 2024

Most natural (from camera) images are multiples of 8x8, but I can't say I would bother with this for non-multiple-of-8 images.

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

No branches or pull requests

3 participants