def _get_image_lib_name_from_object(obj):
    """
    Hackish way to determine from which image lib 'obj' come from
    without importing each lib module individually.
    """
    result = ()
    if obj is not None:
        if hasattr(obj, '_close_exclusive_fp_after_loading'):
            result = 'pil', 'PIL/Pillow'
        elif hasattr(obj, 'FindFirstUnusedColour') and hasattr(obj,
            'GetImageExtWildcard'):
            result = 'wx', 'wxPython'
        elif hasattr(obj, 'createHeuristicMask') and hasattr(obj,
            'setDotsPerMeterX'):
            result = 'qt', 'PyQt(4-5)/PySide(1.x)'
        elif hasattr(obj, 'argpartition') and hasattr(obj, 'newbyteorder'):
            result = 'cv', 'OpenCV'
    return result
