'Analyzes the image provided and attempts to determine whether it is a poster or banner.
:param path: full path to the image
:return: BANNER, POSTER if it concluded one or the other, or None if the image was neither (or didn\'t exist)'

def which_type(self, path):

    if (not os.path.isfile(path)):
        sickrage.srCore.srLogger.warning(((u"Couldn't    check    the    type    of    " + str(path)) + u"    cause    it    doesn't    exist"))
        return None
    with io.open(path, u'rb') as fh:
        img_metadata = extractMetadata(guessParser(StringInputStream(fh.read())))
        if (not img_metadata):
            sickrage.srCore.srLogger.debug(((u'Unable    to    get    metadata    from    ' + str(path)) + u',    not    using    your    existing    image'))
            return None
        img_ratio = (float(img_metadata.get(u'width', 0)) / float(img_metadata.get(u'height', 0)))
        if (0.55 < img_ratio < 0.8):
            return self.POSTER
        elif (5 < img_ratio < 6):
            return self.BANNER
        elif (1.7 < img_ratio < 1.8):
            return self.FANART
        else:
            sickrage.srCore.srLogger.warning(((u'Image    has    size    ratio    of    ' + str(img_ratio)) + u',    unknown    type'))
