(self, target_size_key, source_size_key=OBJECT_ORIGINAL)
Given the size, can an intermediate resolution scaled image be made constrain only by width
Given the size, can an intermediate resolution scaled image be made constrain only by width
Given the size can an intermediate resolution scaled image be made constrain only by width
def can_size(self, target_size_key, source_size_key=OBJECT_ORIGINAL):
        """
        Given the size, can an intermediate resolution scaled image be made constrain only by width
        """
        source_meta = CachedImageMeta.wrap(self.fetch_meta(source_size_key))
        target_size = (OBJECT_SIZE_MAP[target_size_key]['width'], OBJECT_SIZE_MAP[target_size_key]['height'])

        if source_meta.width < target_size[0]:
            return False
        else:
            return True
def can_size ( self , target_size_key , source_size_key = OBJECT_ORIGINAL ) : source_meta = CachedImageMeta . wrap ( self . fetch_meta ( source_size_key ) ) target_size = ( OBJECT_SIZE_MAP [ target_size_key ] [ 'width' ] , OBJECT_SIZE_MAP [ target_size_key ] [ 'height' ] ) if source_meta . width < target_size [ 0 ] : return False else : return True