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

Feature request: jpegtran support #450

Open
pbreah opened this issue May 28, 2021 · 2 comments
Open

Feature request: jpegtran support #450

pbreah opened this issue May 28, 2021 · 2 comments

Comments

@pbreah
Copy link

pbreah commented May 28, 2021

@saschazar21 I have been testing and see many useful use cases to modify the image like cropping. Since this comes as a separate utility to do this (jpegtran), it would complement well what you have already. Probably porting this follows the same pattern as the others you have on this repo.

For more info, the usage document talks about how to use jpegtran:

https://github.com/mozilla/mozjpeg/blob/master/usage.txt

Thanks for the great work so far!

@saschazar21
Copy link
Owner

Hi @pbreah - interesting topic indeed. I'm not sure yet how to include those features though.

Maybe a separate .wasm binary or a totally separate package within this monorepo might do the trick. However, I need to think how and to what extent I may include those features. I'll leave this issue open for now and come back to it once I've come up with a solution.

@pbreah
Copy link
Author

pbreah commented May 30, 2021

I believe a separate .wasm file is the way to go. All these utilities are standalone, so it is something that would work well having a separate package on your monorepo. I have been testing several utilities from other wasm repos and all of these are just many "attempts" to deliver usable tools, but they lack the flexibility to be implemented on a real world project for the web. I already tried 5 repos, and none worked well for the project I am working on. Some of these repos have even huge .wasm files - which is not good.

You have a great structure already with these other tools, and the flexibility needed to continue to grow this repo. Adding extra tools to manipulate the image would make this monorepo a one stop place to get all you need to break free from using canvas on the browser. Plus nobody has ported jpegtran to wasm, you'll be the first one. I wouldn't hesitate to help with this, but don't know how much I could help without c++ experience to write glue code.

I also found this repo that may help see the tool in a standalone way and not from the same mozjpeg repo:
https://github.com/cloudflare/jpegtran.

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

2 participants