def extractImageFromFitzPage(page, doc):
    """Extract a single image from a fitz page or return False.

    Args:
        page: a page of a fitz document.
        doc: fitz doc containing `page`.

    Returns:
        True/False: whether this page contains nothing but a single image
        msg or dict: if False, a msg about what happened, if True a dict
            The dict has at least the fields `width`, `height`, `image`
            and `ext`.  `d["image"]` is the raw binary data.
    """
    imlist = page.getImageList()
    if len(imlist) != 1:
        return False, 'More than one image'
    d = doc.extractImage(imlist[0][0])
    width = d.get('width')
    height = d.get('height')
    if not (width and height):
        return False, 'Extracted, but no size information'
    if width < 600 or height < 800:
        return False, 'Extracted, but below minimum size'
    if d['smask'] != 0:
        return False, 'Extracted, but had some kind of mask'
    return True, d
