Closes #49
This commit is contained in:
parent
173216cd6e
commit
1404be4bf1
3 changed files with 8 additions and 8 deletions
|
|
@ -226,7 +226,7 @@ class Codestream:
|
|||
def __str__(self):
|
||||
msg = 'Codestream:\n'
|
||||
for segment in self.segment:
|
||||
strs = segment.__str__()
|
||||
strs = str(segment)
|
||||
|
||||
# Add indentation
|
||||
strs = [(' ' + x + '\n') for x in strs.split('\n')]
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ class ContiguousCodestreamBox(Jp2kBox):
|
|||
msg = Jp2kBox.__str__(self)
|
||||
msg += '\n Main header:'
|
||||
for segment in self.main_header.segment:
|
||||
segstr = segment.__str__()
|
||||
segstr = str(segment)
|
||||
|
||||
# Add indentation.
|
||||
strs = [('\n ' + x) for x in segstr.split('\n')]
|
||||
|
|
@ -760,7 +760,7 @@ class AssociationBox(Jp2kBox):
|
|||
def __str__(self):
|
||||
msg = Jp2kBox.__str__(self)
|
||||
for box in self.box:
|
||||
boxstr = box.__str__()
|
||||
boxstr = str(box)
|
||||
|
||||
# Add indentation.
|
||||
strs = [('\n ' + x) for x in boxstr.split('\n')]
|
||||
|
|
@ -824,7 +824,7 @@ class JP2HeaderBox(Jp2kBox):
|
|||
def __str__(self):
|
||||
msg = Jp2kBox.__str__(self)
|
||||
for box in self.box:
|
||||
boxstr = box.__str__()
|
||||
boxstr = str(box)
|
||||
|
||||
# Add indentation.
|
||||
strs = [('\n ' + x) for x in boxstr.split('\n')]
|
||||
|
|
@ -1177,7 +1177,7 @@ class ResolutionBox(Jp2kBox):
|
|||
def __str__(self):
|
||||
msg = Jp2kBox.__str__(self)
|
||||
for box in self.box:
|
||||
boxstr = box.__str__()
|
||||
boxstr = str(box)
|
||||
|
||||
# Add indentation.
|
||||
strs = [('\n ' + x) for x in boxstr.split('\n')]
|
||||
|
|
@ -1554,7 +1554,7 @@ class UUIDInfoBox(Jp2kBox):
|
|||
msg = Jp2kBox.__str__(self)
|
||||
|
||||
for box in self.box:
|
||||
box_str = box.__str__()
|
||||
box_str = str(box)
|
||||
|
||||
# Add indentation.
|
||||
lst = [('\n ' + x) for x in box_str.split('\n')]
|
||||
|
|
|
|||
|
|
@ -87,10 +87,10 @@ class Jp2k(Jp2kBox):
|
|||
metadata = ['File: ' + os.path.basename(self.filename)]
|
||||
if len(self.box) > 0:
|
||||
for box in self.box:
|
||||
metadata.append(box.__str__())
|
||||
metadata.append(str(box))
|
||||
else:
|
||||
c = self.get_codestream()
|
||||
metadata.append(c.__str__())
|
||||
metadata.append(str(c))
|
||||
return '\n'.join(metadata)
|
||||
|
||||
def _parse(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue