Merge branch 'issue232' into devel
This commit is contained in:
commit
de28b3b1a1
7 changed files with 16 additions and 98 deletions
|
|
@ -2,14 +2,14 @@
|
||||||
ChangeLog
|
ChangeLog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
0.6.0 (pending)
|
0.6.0
|
||||||
===============
|
=====
|
||||||
|
|
||||||
|
* Added support for OpenJPEG 2.1.0, dropped support for 1.3 and 1.4.
|
||||||
* Added Cinema2K, Cinema4K write support.
|
* Added Cinema2K, Cinema4K write support.
|
||||||
* Added lxml requirement.
|
* Added lxml requirement.
|
||||||
* added set_printoptions, get_printoptions function
|
* added set_printoptions, get_printoptions function
|
||||||
* dropped support for Python 2.6, added support for Python 3.4
|
* dropped support for Python 2.6, added support for Python 3.4
|
||||||
* dropped support for OpenJPEG versions 1.3 and 1.4
|
|
||||||
* dropped windows support (it might work, it might not, I don't much care)
|
* dropped windows support (it might work, it might not, I don't much care)
|
||||||
* added write support for JP2 UUID, dataEntryURL, palette, and component mapping boxes
|
* added write support for JP2 UUID, dataEntryURL, palette, and component mapping boxes
|
||||||
* added read/write support for JPX free, number list, and data reference boxes
|
* added read/write support for JPX free, number list, and data reference boxes
|
||||||
|
|
|
||||||
|
|
@ -76,9 +76,9 @@ copyright = u'2013, John Evans'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.5'
|
version = '0.6'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.5.10'
|
release = '0.6.0'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Advanced Installation Instructions
|
Advanced Installation Instructions
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Most users won't need to read this! You've been warned...
|
|
||||||
|
|
||||||
''''''''''''''''''''''
|
''''''''''''''''''''''
|
||||||
Glymur Configuration
|
Glymur Configuration
|
||||||
|
|
@ -9,11 +8,8 @@ Glymur Configuration
|
||||||
|
|
||||||
The default glymur installation process relies upon OpenJPEG
|
The default glymur installation process relies upon OpenJPEG
|
||||||
being properly installed on your system. If you have version 1.5 you can
|
being properly installed on your system. If you have version 1.5 you can
|
||||||
both read and write JPEG 2000 files, but you may wish to install version 2.0
|
both read and write JPEG 2000 files, but version 2.1 is recommended.
|
||||||
or the 2.0+ version from OpenJPEG's development trunk for better performance.
|
If you compile OpenJPEG yourself, please compile it as a shared library.
|
||||||
If you do that, you should compile it as a shared library (named *openjp2*
|
|
||||||
instead of *openjpeg*) from the developmental source that you can retrieve
|
|
||||||
via subversion. As of this time of writing, svn revision r2691 works.
|
|
||||||
You should also download the test data for the purpose of configuring
|
You should also download the test data for the purpose of configuring
|
||||||
and running OpenJPEG's test suite, check their instructions for all this.
|
and running OpenJPEG's test suite, check their instructions for all this.
|
||||||
You should set the **OPJ_DATA_ROOT** environment variable for the purpose
|
You should set the **OPJ_DATA_ROOT** environment variable for the purpose
|
||||||
|
|
@ -51,60 +47,6 @@ installed in a non-standard place, i.e. ::
|
||||||
[library]
|
[library]
|
||||||
openjpeg: /not/the/usual/location/lib/libopenjpeg.so
|
openjpeg: /not/the/usual/location/lib/libopenjpeg.so
|
||||||
|
|
||||||
''''''''''''''''''''''''''''''
|
|
||||||
Package Management Suggestions
|
|
||||||
''''''''''''''''''''''''''''''
|
|
||||||
|
|
||||||
You only need to read this section if you want detailed
|
|
||||||
platform-specific instructions on running as many tests as possible or wish to
|
|
||||||
use your system's package manager to install as many required
|
|
||||||
packages/RPMs/ports/whatever without going through pip.
|
|
||||||
|
|
||||||
|
|
||||||
Mac OS X
|
|
||||||
--------
|
|
||||||
All the necessary packages are available to use glymur with MacPorts.
|
|
||||||
For python 3.3, you should install the following set of ports:
|
|
||||||
|
|
||||||
* python33
|
|
||||||
* py33-numpy
|
|
||||||
* py33-lxml
|
|
||||||
* py33-distribute
|
|
||||||
* py33-Pillow (optional, for running certain tests)
|
|
||||||
|
|
||||||
MacPorts supplies both OpenJPEG 1.5.0 and OpenJPEG 2.0.0.
|
|
||||||
|
|
||||||
Linux
|
|
||||||
-----
|
|
||||||
For the most part, you only need python and numpy to run glymur, so on
|
|
||||||
just about all distributions you are already set to go (and you don't
|
|
||||||
need to mess around with a configuration file, as the openjpeg shared
|
|
||||||
libraries are found in the usual places thanks to your package manager).
|
|
||||||
In order to run as many tests as possible, however, the following Python
|
|
||||||
packages may also need to be installed. Consult your package manager
|
|
||||||
documentation or use pip.
|
|
||||||
|
|
||||||
* setuptools
|
|
||||||
* python-lxml
|
|
||||||
* matplotlib
|
|
||||||
* pillow
|
|
||||||
* contextlib2 (2.7 only)
|
|
||||||
* mock (2.7 only)
|
|
||||||
|
|
||||||
Glymur 0.6 been tested on the following linux platforms without any unexpected
|
|
||||||
difficulties:
|
|
||||||
|
|
||||||
* OpenSUSE 13.1
|
|
||||||
* Fedora 19
|
|
||||||
* Raspian
|
|
||||||
* Travis CI (currently Ubuntu 12.04?)
|
|
||||||
|
|
||||||
Windows
|
|
||||||
-------
|
|
||||||
The 0.6.x series of Glymur is untested on windows and I make no promises here.
|
|
||||||
I suggest that windows users check the 0.5.x series.
|
|
||||||
|
|
||||||
|
|
||||||
'''''''
|
'''''''
|
||||||
Testing
|
Testing
|
||||||
'''''''
|
'''''''
|
||||||
|
|
@ -128,11 +70,3 @@ or from the command line. ::
|
||||||
|
|
||||||
$ cd /to/where/you/unpacked/glymur
|
$ cd /to/where/you/unpacked/glymur
|
||||||
$ python -m unittest discover
|
$ python -m unittest discover
|
||||||
|
|
||||||
Quite a few tests are currently skipped. These include tests whose
|
|
||||||
OpenJPEG counterparts are already failing, and others which do pass but
|
|
||||||
still produce heaps of output on stderr. Rather than let this swamp
|
|
||||||
the signal (that most of those tests are actually passing), they've been
|
|
||||||
filtered out for now. There are also more skipped tests on Python 2.7
|
|
||||||
than on Python3. The important part is whether or not any test
|
|
||||||
errors are reported at the end.
|
|
||||||
|
|
|
||||||
|
|
@ -1241,8 +1241,10 @@ class FileTypeBox(Jp2kBox):
|
||||||
def _validate(self, writing=False):
|
def _validate(self, writing=False):
|
||||||
"""Validate the box before writing to file."""
|
"""Validate the box before writing to file."""
|
||||||
if self.brand not in ['jp2 ', 'jpx ']:
|
if self.brand not in ['jp2 ', 'jpx ']:
|
||||||
msg = "The file type brand must be either 'jp2 ' or 'jpx '."
|
msg = "The file type brand was '{0}'. "
|
||||||
self._dispatch_validation_error(msg, writing=writing)
|
msg += "It should be either 'jp2 ' or 'jpx '."
|
||||||
|
self._dispatch_validation_error(msg.format(self.brand),
|
||||||
|
writing=writing)
|
||||||
valid_cls = ['jp2 ', 'jpx ', 'jpxb']
|
valid_cls = ['jp2 ', 'jpx ', 'jpxb']
|
||||||
for item in self.compatibility_list:
|
for item in self.compatibility_list:
|
||||||
if item not in valid_cls:
|
if item not in valid_cls:
|
||||||
|
|
@ -2740,12 +2742,7 @@ class XMLBox(Jp2kBox):
|
||||||
def write(self, fptr):
|
def write(self, fptr):
|
||||||
"""Write an XML box to file.
|
"""Write an XML box to file.
|
||||||
"""
|
"""
|
||||||
try:
|
|
||||||
read_buffer = ET.tostring(self.xml, encoding='utf-8')
|
read_buffer = ET.tostring(self.xml, encoding='utf-8')
|
||||||
except (AttributeError, AssertionError):
|
|
||||||
# AssertionError on 2.6
|
|
||||||
read_buffer = ET.tostring(self.xml.getroot(), encoding='utf-8')
|
|
||||||
|
|
||||||
fptr.write(struct.pack('>I4s', len(read_buffer) + 8, b'xml '))
|
fptr.write(struct.pack('>I4s', len(read_buffer) + 8, b'xml '))
|
||||||
fptr.write(read_buffer)
|
fptr.write(read_buffer)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -299,19 +299,6 @@ class TestSuite(unittest.TestCase):
|
||||||
jp2.read()
|
jp2.read()
|
||||||
self.assertTrue(True)
|
self.assertTrue(True)
|
||||||
|
|
||||||
@unittest.skip("fprintf stderr output in r2343.")
|
|
||||||
def test_NR_DEC_123_j2c_3_decode(self):
|
|
||||||
jfile = opj_data_file('input/nonregression/123.j2c')
|
|
||||||
jp2 = Jp2k(jfile)
|
|
||||||
jp2.read()
|
|
||||||
self.assertTrue(True)
|
|
||||||
|
|
||||||
@unittest.skip("fprintf stderr output in r2343.")
|
|
||||||
def test_NR_DEC_bug_j2c_8_decode(self):
|
|
||||||
jfile = opj_data_file('input/nonregression/bug.j2c')
|
|
||||||
Jp2k(jfile).read()
|
|
||||||
self.assertTrue(True)
|
|
||||||
|
|
||||||
def test_NR_DEC_buxI_j2k_9_decode(self):
|
def test_NR_DEC_buxI_j2k_9_decode(self):
|
||||||
jfile = opj_data_file('input/nonregression/buxI.j2k')
|
jfile = opj_data_file('input/nonregression/buxI.j2k')
|
||||||
Jp2k(jfile).read()
|
Jp2k(jfile).read()
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ from .lib import openjp2 as opj2
|
||||||
|
|
||||||
# Do not change the format of this next line! Doing so risks breaking
|
# Do not change the format of this next line! Doing so risks breaking
|
||||||
# setup.py
|
# setup.py
|
||||||
version = "0.5.10"
|
version = "0.6.0"
|
||||||
_sv = LooseVersion(version)
|
_sv = LooseVersion(version)
|
||||||
version_tuple = _sv.version
|
version_tuple = _sv.version
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue