code: def start_compress(codec, image, stream):
      
      OPENJP2.opj_start_compress.argtypes = [CODEC_TYPE,
                                             ctypes.POINTER(ImageType),
                                             STREAM_TYPE_P]
      OPENJP2.opj_start_compress.restype = check_error
  
      OPENJP2.opj_start_compress(codec, image, stream)
docs: Wraps openjp2 library function opj_start_compress.
  
      Start to compress the current image.
  
      Parameters
      ----------
      codec : CODEC_TYPE
          Compressor handle.
      image : pointer to ImageType
          Input filled image.
      stream : STREAM_TYPE_P
          Input stream.
  
      Raises
      ------
      RuntimeError
          If the OpenJPEG library routine opj_start_compress fails.