def encode(cinfo, cio, image):
    """Wrapper for openjpeg library function opj_encode.

    Encodes an image into a JPEG-2000 codestream.

    Parameters
    ----------
    cinfo : compression handle

    cio : output buffer stream

    image : image to encode
    """
    argtypes = [ctypes.POINTER(CompressionInfoType),
                ctypes.POINTER(CioType),
                ctypes.POINTER(ImageType)]
    OPENJPEG.opj_encode.argtypes = argtypes
    OPENJPEG.opj_encode.restype = ctypes.c_int
    status = OPENJPEG.opj_encode(cinfo, cio, image)
    return status
def encode ( cinfo , cio , image ) : argtypes = [ ctypes . POINTER ( CompressionInfoType ) , ctypes . POINTER ( CioType ) , ctypes . POINTER ( ImageType ) ] OPENJPEG . opj_encode . argtypes = argtypes OPENJPEG . opj_encode . restype = ctypes . c_int status = OPENJPEG . opj_encode ( cinfo , cio , image ) return status
Wrapper for openjpeg library function opj_encode.

    Encodes an image into a JPEG-2000 codestream.

    Parameters
    ----------
    cinfo : compression handle

    cio : output buffer stream

    image : image to encode