philadams-zz / dimensions Goto Github PK
View Code? Open in Web Editor NEWread the width, height, and rotation of images.
License: MIT License
read the width, height, and rotation of images.
License: MIT License
pls support Py3.2. I see "Cannot import StringIO" and see this
https://docs.python.org/3.0/whatsnew/3.0.html
StringIO and cStringIO modules are gone. Instead, import the io module and use io.StringIO or io.BytesIO for text and data respectively.
i use in my code. i place folder dimensions
to path (sys.path) and now have error
"Cannot import JPGFile"
fix is this
from . import PNGFile
from . import GIFFile
from . import JPEGFile
in core.py.
import from .!!
In Python 2.7
import dimensions
print dimensions.dimensions(u'duck.jpg')
Fails with:
Traceback (most recent call last):
File "test.py", line 3, in <module>
dimensions.dimensions(u'duck.jpg')
File "/Users/perezju/.pyenv/versions/dinah_env/lib/python2.7/site-packages/dimensions/core.py", line 55, in dimensions
dims = get_dimensions(filenames)
File "/Users/perezju/.pyenv/versions/dinah_env/lib/python2.7/site-packages/dimensions/core.py", line 27, in get_dimensions
with open(filename, 'rb') as fp:
IOError: [Errno 2] No such file or directory: u'd'
A silly workaround is to pass a list with a single element:
print dimensions.dimensions([u'duck.jpg'])
When I tried to import dimensions, I got this error message. I'm using python 3.4 on windows 7.
Traceback (most recent call last):
File "G:\site\gallery\gen_code.py", line 1, in
import os, dimensions
File "C:\Python34\lib\site-packages\dimensions__init__.py", line 1, in
from .core import dimensions, cli
File "C:\Python34\lib\site-packages\dimensions\core.py", line 15, in
import PNGFile
ImportError: No module named 'PNGFile'
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.