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 mozjpeg support #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

rolandboon
Copy link

I wrote "quick and dirty" support for compression with mozjpeg. It checks if a mozjpeg command is available, if not it falls back on jpegoptim. You need to compile the binaries yourself, they are not provided by the piet-binary gem.

Maybe it's an idea to introduce a configuration file which can be used to specify the used optimizers, it's binary paths and specific optimizer flags. Don't know if you want to go that way with this project?

@albertbellonch
Copy link
Owner

Hi @rolandboon,

Thanks for your proposal! I like that we can expand the possibilities of piet in order to use multiple optimizers.

The only thing I don't like is not leaving to the user the power to choose. What happens if I have both jpegoptim and mozjpeg installed in the machine and I want to use the first one?

I will gladly accept this PR when you can manage to allow this to happen. Somehow leaving the user some chance to choose one tool or the other one, and defaulting to jpegoptim in case nothing is specificly said in order to guarantee backwards compatibility.

Any ideas?

@rolandboon
Copy link
Author

I agree with your issue, that's why i mentioned:
Maybe it's an idea to introduce a configuration file which can be used to specify the used optimizers, it's binary paths and specific optimizer flags.

Shall I set something up like that using this pattern?

@aried3r
Copy link

aried3r commented Mar 30, 2016

I'm also interested in this. Would this be an option if it were configurable?

@albertbellonch
Copy link
Owner

Hi @rolandboon and @aried3r,

I'll accept this option for sure, as long as it is configurable and the gem user can choose whether to use one or the other.

Can anyone come up with a working solution?

@aried3r
Copy link

aried3r commented Mar 30, 2016

I'm not sure I have the time right away. But since piet, or at least piet-binary aims to be a simple solution, do you think you can add the mozjpeg binaries to it?

@albertbellonch
Copy link
Owner

Hi @aried3r,

To what purpose would adding the binaries be useful for? I understand the goal is to offer this binary functionality as an additional option to piet, but not just the binaries.

Best,

@aried3r
Copy link

aried3r commented Apr 15, 2016

but not just the binaries

Absolutely, I wasn't clear. I'd love to have optional support in piet, but also the option to easily install the binary with piet-binary. I'm not sure when I'll find the time to add a configuration option, though.

@albertbellonch
Copy link
Owner

Hi @aried3r,

Good then. I don't have much time either, but if you do some day, I'll gladly merge it.

Best,

@pavelloz
Copy link

pavelloz commented Aug 30, 2016

That would be a great feature :)

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.

4 participants