samastur / image-diet2 Goto Github PK
View Code? Open in Web Editor NEWA Django application for removing unnecessary bytes from images. Backwards incompatible evolution of image-diet.
License: MIT License
A Django application for removing unnecessary bytes from images. Backwards incompatible evolution of image-diet.
License: MIT License
Current code does not handle well cases where temp directory can't be used (doesn't exist, read only...).
It should fail gracefully by logging the error and maybe returning original content?
Check out effectiveness of PNG tools listed at http://css-ig.net/png-tools-overview.
Check also JPEG tools used in http://css-ig.net/scriptjpg
It would be great to add a shell command for compressing images that can use pyimagediet for simplified handling of external tools. Even better if configuration was loaded from somewhere like ~/.imagedietrc.
(django)vagrant@ubuntu-14:/var/www/media$ diet
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/django/bin/diet", line 9, in <module>
load_entry_point('pyimagediet==1.1.0', 'console_scripts', 'diet')()
File "/home/vagrant/.virtualenvs/django/lib/python3.4/site-packages/pkg_resources/__init__.py", line 547, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/vagrant/.virtualenvs/django/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2710, in load_entry_point
return ep.load()
File "/home/vagrant/.virtualenvs/django/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2370, in load
return self.resolve()
File "/home/vagrant/.virtualenvs/django/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2376, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named 'pyimagediet.scripts'
Running in:
Python 3.4.3 Virtual Env
I would like an option to run the compression commands asynchronously (should be able to do this with subprocess Popen) so that the webserver does not need to wait for these commands to run. Having the webserver wait for IO operations is generally not a good idea, as you want the browser to return as quickly as possible. Having the optimizations run in the background should be fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.