========
.. image:: https://badge.fury.io/py/optimage.svg
:target: http://badge.fury.io/py/optimage
.. image:: https://travis-ci.org/sk-/optimage.svg?branch=master
:target: https://travis-ci.org/sk-/optimage
.. image:: https://coveralls.io/repos/sk-/optimage/badge.svg?branch=master
:target: https://coveralls.io/r/sk-/optimage?branch=master
Optimage optimizes JPEGs and PNGs by losslessly recompressing them and removing
unnecessary metadata (EXIF, comments, etc), making the web faster and your repo
smaller.
Optimizers
----------
- JPEG
* `jpegtran <http://manpages.ubuntu.com/manpages/trusty/man1/jpegtran.1.html>`_
* `jpegoptim <http://manpages.ubuntu.com/manpages/trusty/man1/jpegoptim.1.html>`_
- PNG
* `pngcrush <http://manpages.ubuntu.com/manpages/trusty/man1/pngcrush.1.html>`_
* `optipng <http://manpages.ubuntu.com/manpages/trusty/man1/optipng.1.html>`_
Example usage
-------------
$ optimage test_data/valid1.png
File can be losslessly compressed to 67 bytes (savings: 52 bytes = 43.70%)
Replace it by running either:
optimage --replace test_data/valid1.png
optimage --output <FILENAME> test_data/valid1.png
$ optimage --replace test_data/valid1.png
File was losslessly compressed to 67 bytes (savings: 52 bytes = 43.70%)
$ optimage --output /tmp/valid1.png test_data/valid1.png
File was losslessly compressed to 67 bytes (savings: 52 bytes = 43.70%)
Installation
------------
You can install, upgrade or uninstall ``optimage`` with these commands::
$ pip install optimage
$ pip install --upgrade optimage
$ pip uninstall optimage
Python Versions
---------------
Python 2.7, 3.3, 3.4 and 3.5 are supported.
Development
-----------
Help for this project is more than welcomed, so feel free to create an issue or
to send a pull request via http://github.com/sk-/optimage.
Tests are run using pytest, either with::
$ python setup.py test
$ pytest
Changelog
=========
v0.3.0 (2017-03-19)
----------
* Fixed #19: remove --lossy_8bit from zopflipng call
* Fixed #13: temporary files are removed after use
v0.2.0 (2016-02-08)
-------------------
* Added support for Python 2.7
* Added support for zopflipng
* Fixed #4: Images are now considered equal when alpha is 0 regardless of RGB.
* Fixed #6: Add --debug option to gather performance stats
v0.0.1 (2015-12-24)
-------------------
* Initial release with support for (jpegtran, jpegoptim, optipng, pngcrush)
Metadata
Release files for optimage 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| optimage-0.3.0.tar.gz | 11.0 kB | Without provenance | Details for optimage-0.3.0.tar.gz |
Release files / optimage-0.3.0.tar.gz
| Download URL | optimage-0.3.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21fa65e121bb9fa53f11a2ff9c20d8cb086bf1d949100ffdd3cb275d142ee3ed
|
|
BLAKE2b-256 checksum How to use checksums |
01ee5030cd418c6d1561e7c7283c95394f6424866066677b71dc72653149a295
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for optimage 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.