Return a fully-qualified reference_image string.
435071
def reference_image_path(cls, project, location, product, reference_image):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}",
            project=project,
            location=location,
            product=product,
            reference_image=reference_image,
        )
889617
def iiif_image_key(obj):
    """"""
    if isinstance(obj, ObjectVersion):
        bucket_id = obj.bucket_id
        version_id = obj.version_id
        key = obj.key
    else:
        bucket_id = obj.get('bucket')
        version_id = obj.get('version_id')
        key = obj.get('key')
    return u'{}:{}:{}'.format(
        bucket_id,
        version_id,
        key,
    )
939294
def parse_image_name(name):
    
    name = name or ""
    if '/' in name:
        repository, other = name.split('/')
    else:
        repository, other = None, name

    if ':' in other:
        name, version = other.split(':')
    else:
        name, version = other, 'latest'

    return repository, name, version
1146771
def get_image_label(name, default="not_found.png"):
    """"""
    label = QLabel()
    label.setPixmap(QPixmap(get_image_path(name, default)))
    return label
460608
def base_name_from_image(image):
    
    m = re.match("^(.+/)?([^:/]+)(:[^:]+)?$", image)
    algo_name = m.group(2) if m else image
    return algo_name
1294674
def image_url(self):
        """"""
        return construct_api_url(self.input, 'image', self.resolvers, False, self.get3d, False, **self.kwargs)
791990
def _get_absolute_reference(self, ref_key):
        """"""

        key_str = u", ".join(map(str, ref_key))
        return u"S[" + key_str + u"]"
1337025
def png(self):
        """"""
        use_plugin('freeimage')
        with TemporaryFilePath(suffix='.png') as tmp:
            safe_range_im = 255 * normalise(self)
            imsave(tmp.fpath, safe_range_im.astype(np.uint8))
            with open(tmp.fpath, 'rb') as fh:
                return fh.read()
1056657
def set_referencepixel(self, pix):
        """"""
        assert len(pix) == len(self._coord["crpix"])
        self._coord["crpix"] = pix[::-1]
342810
def _repr_png_(self):
        """"""
        b = BytesIO()
        im = self.as_pil_image()
        im.save(b, 'PNG')
        return b.getvalue()
70231
def link_for_image(self, base_dir: str, conf: Config) -> int:
        """"""
        return self.link_types(
            base_dir,
            [ArtifactType.app, ArtifactType.binary, ArtifactType.gen_py],
            conf)
1047738
def _get_or_add_image(self, image_file):
        
        image_part, rId = self.part.get_or_add_image_part(image_file)
        desc, image_size = image_part.desc, image_part._px_size
        return rId, desc, image_size
1086465
public static LoadableImageData getImageDataFor(String ref) {
		LoadableImageData imageData;
		checkProperty();
		
		ref = ref.toLowerCase();
		
        if (ref.endsWith(".tga")) {
        	return new TGAImageData();
        } 
        if (ref.endsWith(".png")) {
        	CompositeImageData data = new CompositeImageData();
        	if (usePngLoader) {
        		data.add(new PNGImageData());
        	}
        	data.add(new ImageIOImageData());
        	
        	return data;
        } 
        
        return new ImageIOImageData();
	}
613187
function requirifyImageReference(markdownImageReference) {
  const [, mdImageStart, mdImagePath, optionalMdTitle, mdImageEnd ] = imagePathRE.exec(markdownImageReference) || []
  if (!mdImagePath) {
    return JSON.stringify(markdownImageReference)
  } else {
    const imageRequest = loaderUtils.stringifyRequest(
      this,
      loaderUtils.urlToRequest(mdImagePath)
    )
    const mdImageTitleAndEnd = optionalMdTitle ? JSON.stringify(optionalMdTitle + mdImageEnd) : JSON.stringify(mdImageEnd)

    return `${JSON.stringify(mdImageStart)} + require(${imageRequest}) + ${mdImageTitleAndEnd}`
  }
}
1234335
def get_reference_data(data_dir=None):
    '''
    '''

    data_dir = fix_data_dir(data_dir)
    reffile_path = os.path.join(data_dir, 'REFERENCES.json')

    return fileio.read_references(reffile_path)
649061
def getImageObject(url, referrer, session, max_content_bytes=MaxImageBytes):
    """"""
    return urlopen(url, session, referrer=referrer, max_content_bytes=max_content_bytes, stream=True)
44276
def get_qpimage_raw(self, idx=0):
        """"""
        qpi = qpimage.QPImage(h5file=self.path,
                              h5mode="r",
                              h5dtype=self.as_type,
                              ).copy()
        # Remove previously performed background correction
        qpi.set_bg_data(None)
        # Force meta data
        for key in self.meta_data:
            qpi[key] = self.meta_data[key]
        # set identifier
        qpi["identifier"] = self.get_identifier(idx)
        return qpi