Skip to content

Add mozjpeg support#23

Open
rolandboon wants to merge 1 commit into
albertbellonch:masterfrom
rolandboon:master
Open

Add mozjpeg support#23
rolandboon wants to merge 1 commit into
albertbellonch:masterfrom
rolandboon:master

Conversation

@rolandboon

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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

aried3r commented Mar 30, 2016

Copy link
Copy Markdown

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

@albertbellonch

Copy link
Copy Markdown
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

aried3r commented Mar 30, 2016

Copy link
Copy Markdown

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
Copy Markdown
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

aried3r commented Apr 15, 2016

Copy link
Copy Markdown

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
Copy Markdown
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

pavelloz commented Aug 30, 2016

Copy link
Copy Markdown

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