-
Notifications
You must be signed in to change notification settings - Fork 109
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
Fix an issue not working OptiPNG interlace option #136
Fix an issue not working OptiPNG interlace option #136
Conversation
@@ -42,6 +42,10 @@ def optimize(src, dst) | |||
end | |||
execute(:optipng, *args) && optimized?(src, dst) | |||
end | |||
|
|||
def optimized?(src, dst) | |||
(interlace && dst.size?) || super |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If interlace
is true
, running super
is not needed, so interlace ? dst.size? : super
would be clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right. And I've fixed it.
Thanks for contribution. |
I've added the content of this PR to CHANGELOG. Then, so I run the following steps?
|
What do you mean by ####? |
2ae9ef5
to
73d3f6d
Compare
I didn't know a method to combine commits of a PR by |
Oh, CI failed... Is there anything else that I need to work? |
I'm investigating why appveyor fails and travis is missing from the checks |
I've fixed appveyor and travis should be working |
73d3f6d
to
d37e43a
Compare
d37e43a
to
1d3aa63
Compare
@toy Thanks! I rebased this branch by master, and then CI was succeeded. |
Thanks😇 |
Thanks you! I'll release after few more changes unless you want it as soon as possible. |
I have fixed an issue not working OptiPNG worker when the
interlace
option enabled.The reason is that the file size of an interlaced PNG is greater than the file size of a non interlaced PNG generally, so I have changed so that
optimized?
conditions for OptiPNG worker is always true if theinterlace
option is enabled.