diff --git a/glymur/jp2box.py b/glymur/jp2box.py index 39f2f16..b6f92f7 100644 --- a/glymur/jp2box.py +++ b/glymur/jp2box.py @@ -433,7 +433,8 @@ class ChannelDefinitionBox(Jp2kBox): association : int index of the associated color """ - def __init__(self, index=None, channel_type=None, association=None, **kwargs): + def __init__(self, index=None, channel_type=None, association=None, + **kwargs): Jp2kBox.__init__(self, box_id='cdef', longname='Channel Definition') # channel type and association must be specified. @@ -513,8 +514,8 @@ class ChannelDefinitionBox(Jp2kBox): channel_type = data[1:num_components * 6:3] association = data[2:num_components * 6:3] - box = ChannelDefinitionBox(index=index, channel_type=channel_type, - association=association, length=length, + box = ChannelDefinitionBox(index=index, channel_type=channel_type, + association=association, length=length, offset=offset) return box diff --git a/glymur/lib/openjpeg.py b/glymur/lib/openjpeg.py index 6a984b9..3dd0592 100644 --- a/glymur/lib/openjpeg.py +++ b/glymur/lib/openjpeg.py @@ -23,7 +23,7 @@ def version(): # Need to get the minor version, make sure we are at least at 1.4.x #import pdb; pdb.set_trace() -_minor = version().split('.')[1] +_MINOR = version().split('.')[1] class EventMgrType(ctypes.Structure): @@ -103,7 +103,7 @@ class DecompressionParametersType(ctypes.Structure): # entire codestream or be limited to the main header ("cp_limit_decoding", ctypes.c_int)] - if _minor != '4': + if _MINOR == '5': _fields_.append(("flags", ctypes.c_uint))