code: def decode(codec, stream, image):
      
      OPENJP2.opj_decode.argtypes = [CODEC_TYPE, STREAM_TYPE_P,
                                     ctypes.POINTER(ImageType)]
      OPENJP2.opj_decode.restype = check_error
  
      OPENJP2.opj_decode(codec, stream, image)
docs: Reads an entire image.
  
      Wraps the openjp2 library function opj_decode.
  
      Parameters
      ----------
      codec : CODEC_TYPE
          The JPEG2000 codec
      stream : STREAM_TYPE_P
          The stream to decode.
      image : ImageType
          Output image structure.
  
      Raises
      ------
      RuntimeError
          If the OpenJPEG library routine opj_decode fails.