Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Python module and command line tool for tinypng.com
_
Shrink PNG files. Advanced lossy compression for PNG images that preserves full alpha transparency. Now also works with JPEG files.
Note: This project is not affiliated with tinypng.com
_ or Voormedia B.V.
_
Important: You require an API key which you may obtain from
tinypng.com/developers
_.
Besides specifying keys via command line arguments you can:
Programatic api
::
from tinypng import shrink_file
# implicitly writes to "your_file.tiny.png"
shrink_info = shrink_file("your_file.png", api_key='your_key_here')
shrink_info = shrink_file(
"your_input_file.png",
api_key='your_key_here',
out_filepath="your_output_file.png"
)
shrink_info == {
"output": {
"type": "image/png",
"filepath": "/path/your_input_file.png",
"size": 36988,
"ratio": 0.8279,
"url": "https://api.tinypng.com/output/abcdefg123456.jpg"
},
"url": "https://api.tinypng.com/output/abcdefg123456.jpg",
"compression_count": "123",
"input": {
"type": "image/png",
"size": 44679
}
}
.. _tinypng.com: https://tinypng.com
.. _Voormedia B.V.: http://voormedia.com/
.. _tinypng.com/developers: https://tinypng.com/developers
FAQs
Access api.tinypng.org from the shell and python scripts
We found that tinypng demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.