def _component2dtype(self, component):
if component.prec > <NUM_LIT:16>:<EOL><INDENT>msg = "<STR_LIT>".format(component.prec)<EOL>raise IOError(msg)<EOL><DEDENT>if component.sgnd:<EOL><INDENT>dtype = np.int8 if component.prec <=<NUM_LIT:8> else np.int16<EOL><DEDENT>else:<EOL><INDENT>dtype = np.uint8 if component.prec <=<NUM_LIT:8> else np.uint16<EOL><DEDENT>return dtype<EOL>
Determin the appropriate numpy datatype for an OpenJPEG component.

        Parameters
        ----------
        component : ctypes pointer to ImageCompType (image_comp_t)
            single image component structure.

        Returns
        -------
        builtins.type
            numpy datatype to be used to construct an image array