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 jpegoptim_progressive filter to convert jpegs to progressive scan #2742

Merged
merged 1 commit into from May 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.txt
Expand Up @@ -45,6 +45,7 @@
* `Felix Schwarz <https://github.com/FelixSchwarz>`_
* `Florian Finkernagel <https://github.com/TyberiusPrime>`_
* `follower <https://github.com/follower>`_
* `George Leslie-Waksman <https://github.com/gwax>`_
* `Grzegorz Śliwiński <https://github.com/fizyk>`_
* `Guillermo O. Freschi <https://github.com/Tordek>`_
* `Hardening <https://github.com/hardening>`_
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.txt
Expand Up @@ -20,6 +20,8 @@ Features
* Include KaTeX CSS automatically when needed (Issue #2715)
* Split out math code into new ``math_helper.tmpl`` template (Issue
#2715)
* Added ``jpegoptim_progressive`` filter to convert jpeg images to progressive
jpegs.

Bugfixes
--------
Expand Down
6 changes: 6 additions & 0 deletions nikola/filters.py
Expand Up @@ -178,6 +178,12 @@ def jpegoptim(infile, executable='jpegoptim'):
return runinplace("{} -p --strip-all -q %1".format(executable), infile)


@_ConfigurableFilter(executable='JPEGOPTIM_EXECUTABLE')
def jpegoptim_progressive(infile, executable='jpegoptim'):
"""Run jpegoptim on a file and convert to progressive."""
return runinplace("{} -p --strip-all --all-progressive -q %1".format(executable), infile)


@_ConfigurableFilter(executable='HTML_TIDY_EXECUTABLE')
def html_tidy_withconfig(infile, executable='tidy5'):
"""Run HTML Tidy with tidy5.conf as config file."""
Expand Down