def METHOD_NAME(image_data: bytes) -> QtGui.QImage:
    img = QtGui.QImage()
    success = img.loadFromData(image_data)
    if not success:
        try:
            if pil_available:
                # Qt doesn't understand the format, but maybe PIL does
                img = ImageQt.ImageQt(Image.open(io.BytesIO(image_data)))
                success = True
        except Exception:
            pass
    # if still nothing, go with default image
    if not success:
        img.load(str(graphics_path / "nocover.png"))
    return img