check if the loaded image object (self.simage) has an associated uri
        return if yes, None if not.
497653
def get_uri(self):
    ''' 
    '''
    if hasattr(self, 'simage'):
        if self.simage is not None:
            if self.simage.image not in ['', None]:
                # Concatenates the <uri>://<image>
                return str(self.simage)
1294156
def has_template(self, uri):
        
        try:
            self.get_template(uri)
            return True
        except exceptions.TemplateLookupException:
            return False
862796
def _load_image(cls, rkey):
        """"""

        v = cls._stock[rkey]
        img = None
        itype = v['type']
        if itype in ('stock', 'data'):
            img = tk.PhotoImage(format=v['format'], data=v['data'])
        elif itype == 'created':
            img = v['image']
        else:
            img = tk.PhotoImage(file=v['filename'])
        cls._cached[rkey] = img
        logger.info('Loaded resource %s.' % rkey)
        return img
642337
def getImage(self):
        """"""
        value = self.__getNone(self.__dataItem['image']['url'])
        if value == None:
            return None
        else:
            return Sitools2Abstract.getBaseUrl(self) + self.__dataItem['image']['url']
1268684
def has(prop, object_or_dct):
    
    return prop in object_or_dct if isinstance(dict, object_or_dct) else hasattr(object_or_dct, prop)
444505
def has_cover_image?(check = nil)
    	post = obtain_record(check)
    	!post.blank? && !post.cover_image.blank? ? true : false
    end
1229024
def is_image(self, key):
        """"""
        data = self.model.get_data()
        return isinstance(data[key], Image)
806883
private boolean isImagePullRequired(AbstractRemoteDockerImage image) {
        boolean isAllNamesRequired = isAllNamesRequired();
        boolean isAllTagsRequired  = isAllTagsRequired();
        boolean isAllDigestsRequired = isAllDigestsRequired();

        // All images are required ?
        boolean forcePulling = config.isForcePull();
        // We want to pull everything - so every image is required
        if (isAllNamesRequired && isAllTagsRequired && isAllDigestsRequired && forcePulling) {
            return true;
        }

        // Otherwise we check if the image data is full for specific tag(s)/sha256
        if (!isImageDataValid(image)) {
            return false;
        }

        // Data from the remote image
        List<String> imageTags = image.getImageTags();
        String imageDigest = image.getImageDigest();
        String imageName = image.getRepositoryName();

        if (imageTags == null || imageTags.isEmpty()) {
            logger.info("Image {} with Digest {} - does not have any tags and will be ignored", imageName, imageDigest);
            return false;
        }

        // Data from the config file
        List<String> configImageNames = config.getImageNames();
        List<String> configImageTags = config.getImageTags();
        List<String> configImageDigests = config.getImageDigests();

        boolean isNameMet;
        // Empty configuration = similar to using all names
        if (configImageNames == null) {
            isNameMet = true;
            logger.debug("Configuration - docker.pull.images was not found - using .*.* as default");
        }
        // 'Name' may have a regular expression match
        else {
            isNameMet = isAllNamesRequired || configImageNames.contains(imageName) || isMatchStringInList(imageName, configImageNames);
        }

        // 'Tag' may have a regular expression match
        // 'Tag' should consider pulling/ignoring images with the WS.Scanned tag - according to 'docker.pull.force' flag
        boolean isTagMet = false;
        if (configImageTags == null) {
            isTagMet = true;
            logger.debug("Configuration - docker.pull.tags was not found - using .*.* as default");
        }else {
            for(String currentTag : imageTags) {
                isTagMet = isTagMet || configImageTags.contains(currentTag) || isMatchStringInList(currentTag, configImageTags);
            }
        }

        // 'Digest' cannot have a regular expression match
        boolean isDigestMet = isAllDigestsRequired || configImageDigests.contains(imageDigest);

        // Do not pull images that are already tagged with WS.Scanned tag
        if (!forcePulling) {
            if (imageTags.contains(WS_SCANNED_TAG)) {
                logger.debug("Image {} - was scanned already", imageName);
                isTagMet = false;
            }
        }

        // Is this tag/sha256/name in the required tags/sha256/name list?
        boolean result = isNameMet && isTagMet && isDigestMet ;
        if (!result) {
            logger.debug("Image does not met the requirements: {}", image);
            logger.debug("Name met - {} , Tag met - {} , Digest met - {}", isNameMet, isTagMet, isDigestMet);
        }
        return result;
    }
317718
def is_img_id_exists(img_id):
    
    main_rel_path = get_relative_path_from_img_id(img_id)
    main_path = media_path(main_rel_path)
    return os.path.isfile(main_path)
194350
def check_animated(cls, raw_image):
        ""
        try:
            raw_image.seek(1)
        except EOFError:
            isanimated= False
        else:
            isanimated= True
            raise cls.AnimatedImageException
48524
def _is_image_sequenced(image):
    """"""
    try:
        image.seek(1)
        image.seek(0)
        result = True
    except EOFError:
        result = False

    return result
37375
def on_art_image(self, *args):
        
        if self.art_image is not None:
            self.art_texture = self.art_image.texture
669011
function isImage(node) {
  return (
    node.nodeName === META
    && node.attrs.find(({ name, value }) => {
      value = value.trim();
      return name === 'itemprop' && value === 'image';
    })
  );
}
98011
def maybe_imgur(self, path):
        '''
        '''
        if not FLAGS.imgur_client_id:
            return path

        im = pyimgur.Imgur(FLAGS.imgur_client_id)
        uploaded_image = im.upload_image(path)
        return '%s %s' % (path, uploaded_image.link)
1094827
def is_image(file):
    
    match = re.match(r'\.(png|jpe?g)', _get_extension(file), re.IGNORECASE)
    if match:
        return True
    else:
        return isinstance(resolve_bot_file_id(file), types.Photo)
1122950
def check_image_in_specs(img_path, resize_to)
      @resize_specs.each do |resize_spec|
        if resize_to == resize_spec.resize_to && File.fnmatch(resize_spec.path, img_path)
          return true
        end
      end
      return false
    end
1287336
def rbd_exists(service, pool, rbd_img):
    """"""
    try:
        out = check_output(['rbd', 'list', '--id',
                            service, '--pool', pool])
        if six.PY3:
            out = out.decode('UTF-8')
    except CalledProcessError:
        return False

    return rbd_img in out