def set_decode_area(codec, image, start_x=<NUM_LIT:0>, start_y=<NUM_LIT:0>, end_x=<NUM_LIT:0>, end_y=<NUM_LIT:0>):
OPENJP2.opj_set_decode_area.argtypes = [CODEC_TYPE,<EOL>ctypes.POINTER(ImageType),<EOL>ctypes.c_int32,<EOL>ctypes.c_int32,<EOL>ctypes.c_int32,<EOL>ctypes.c_int32]<EOL>OPENJP2.opj_set_decode_area.restype = check_error<EOL>OPENJP2.opj_set_decode_area(codec, image,<EOL>ctypes.c_int32(start_x),<EOL>ctypes.c_int32(start_y),<EOL>ctypes.c_int32(end_x),<EOL>ctypes.c_int32(end_y))<EOL>
Wraps openjp2 library function opj_set_decode area.

    Sets the given area to be decoded.  This function should be called right
    after read_header and before any tile header reading.

    Parameters
    ----------
    codec : CODEC_TYPE
        Codec initialized by create_decompress function.
    image : ImageType pointer
        The decoded image previously set by read_header.
    start_x, start_y : optional, int
        The left and upper position of the rectangle to decode.
    end_x, end_y : optional, int
        The right and lower position of the rectangle to decode.

    Raises
    ------
    RuntimeError
        If the OpenJPEG library routine opj_set_decode_area fails.