def encode(cinfo, cio, image):
argtypes = [ctypes.POINTER(CompressionInfoType),<EOL>ctypes.POINTER(CioType),<EOL>ctypes.POINTER(ImageType)]<EOL>OPENJPEG.opj_encode.argtypes = argtypes<EOL>OPENJPEG.opj_encode.restype = ctypes.c_int<EOL>status = OPENJPEG.opj_encode(cinfo, cio, image)<EOL>return status<EOL>
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