openjp2's decode_tile_data handler was returning the codec. It should not. #125
This commit is contained in:
parent
813f5f3a03
commit
89c0863706
1 changed files with 6 additions and 1 deletions
|
|
@ -655,7 +655,6 @@ def decode_tile_data(codec, tidx, data, data_size, stream):
|
||||||
datap,
|
datap,
|
||||||
ctypes.c_uint32(data_size),
|
ctypes.c_uint32(data_size),
|
||||||
stream)
|
stream)
|
||||||
return codec
|
|
||||||
|
|
||||||
|
|
||||||
def create_decompress(codec_format):
|
def create_decompress(codec_format):
|
||||||
|
|
@ -690,6 +689,7 @@ def destroy_codec(codec):
|
||||||
Decompressor handle to destroy.
|
Decompressor handle to destroy.
|
||||||
"""
|
"""
|
||||||
OPENJP2.opj_destroy_codec.argtypes = [CODEC_TYPE]
|
OPENJP2.opj_destroy_codec.argtypes = [CODEC_TYPE]
|
||||||
|
OPENJP2.opj_destroy_codec.restype = ctypes.c_void_p
|
||||||
OPENJP2.opj_destroy_codec(codec)
|
OPENJP2.opj_destroy_codec(codec)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -840,6 +840,7 @@ def image_destroy(image):
|
||||||
Image resource to be disposed.
|
Image resource to be disposed.
|
||||||
"""
|
"""
|
||||||
OPENJP2.opj_image_destroy.argtypes = [ctypes.POINTER(ImageType)]
|
OPENJP2.opj_image_destroy.argtypes = [ctypes.POINTER(ImageType)]
|
||||||
|
OPENJP2.opj_image_destroy.restype = ctypes.c_void_p
|
||||||
|
|
||||||
OPENJP2.opj_image_destroy(image)
|
OPENJP2.opj_image_destroy(image)
|
||||||
|
|
||||||
|
|
@ -1056,6 +1057,7 @@ def set_default_decoder_parameters():
|
||||||
"""
|
"""
|
||||||
ARGTYPES = [ctypes.POINTER(DecompressionParametersType)]
|
ARGTYPES = [ctypes.POINTER(DecompressionParametersType)]
|
||||||
OPENJP2.opj_set_default_decoder_parameters.argtypes = ARGTYPES
|
OPENJP2.opj_set_default_decoder_parameters.argtypes = ARGTYPES
|
||||||
|
OPENJP2.opj_set_default_decoder_parameters.restype = ctypes.c_void_p
|
||||||
|
|
||||||
dparams = DecompressionParametersType()
|
dparams = DecompressionParametersType()
|
||||||
OPENJP2.opj_set_default_decoder_parameters(ctypes.byref(dparams))
|
OPENJP2.opj_set_default_decoder_parameters(ctypes.byref(dparams))
|
||||||
|
|
@ -1094,6 +1096,7 @@ def set_default_encoder_parameters():
|
||||||
"""
|
"""
|
||||||
ARGTYPES = [ctypes.POINTER(CompressionParametersType)]
|
ARGTYPES = [ctypes.POINTER(CompressionParametersType)]
|
||||||
OPENJP2.opj_set_default_encoder_parameters.argtypes = ARGTYPES
|
OPENJP2.opj_set_default_encoder_parameters.argtypes = ARGTYPES
|
||||||
|
OPENJP2.opj_set_default_encoder_parameters.restype = ctypes.c_void_p
|
||||||
|
|
||||||
cparams = CompressionParametersType()
|
cparams = CompressionParametersType()
|
||||||
OPENJP2.opj_set_default_encoder_parameters(ctypes.byref(cparams))
|
OPENJP2.opj_set_default_encoder_parameters(ctypes.byref(cparams))
|
||||||
|
|
@ -1323,6 +1326,7 @@ def stream_destroy(stream):
|
||||||
The file stream.
|
The file stream.
|
||||||
"""
|
"""
|
||||||
OPENJP2.opj_stream_destroy.argtypes = [STREAM_TYPE_P]
|
OPENJP2.opj_stream_destroy.argtypes = [STREAM_TYPE_P]
|
||||||
|
OPENJP2.opj_stream_destroy.restype = ctypes.c_void_p
|
||||||
OPENJP2.opj_stream_destroy(stream)
|
OPENJP2.opj_stream_destroy(stream)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1337,6 +1341,7 @@ def stream_destroy_v3(stream):
|
||||||
The file stream.
|
The file stream.
|
||||||
"""
|
"""
|
||||||
OPENJP2.opj_stream_destroy_v3.argtypes = [STREAM_TYPE_P]
|
OPENJP2.opj_stream_destroy_v3.argtypes = [STREAM_TYPE_P]
|
||||||
|
OPENJP2.opj_stream_destroy_v3.restype = ctypes.c_void_p
|
||||||
OPENJP2.opj_stream_destroy_v3(stream)
|
OPENJP2.opj_stream_destroy_v3(stream)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue