Certificate@image
544390
public function image() {
        $tree = Globals::getTree();
        $cid   = Filter::get('cid');
        $certificate = null;
        if(!empty($cid)) $certificate =  Certificate::getInstance($cid, $tree, null, $this->provider);
        
        $imageBuilder = new ImageBuilder($certificate);
        
        if (!empty(Filter::get('cb'))) {
            $imageBuilder->setExpireOffset($imageBuilder->getExpireOffset() * 7);
        }
        
        $imageBuilder
            ->setShowWatermark(Auth::accessLevel($tree) >= $this->module->getSetting('MAJ_SHOW_NO_WATERMARK', Auth::PRIV_HIDE))
            ->setFontMaxSize($this->module->getSetting('MAJ_WM_FONT_MAXSIZE', 18))
            ->setFontColor($this->module->getSetting('MAJ_WM_FONT_COLOR', '#4D6DF3'))
        ;
        
        $imageBuilder->render();
        
    }
705661
def url(options = {})
      image = image_file

      raise MissingImageFileError, "Missing image file for #{inspect}" if image.nil?

      image = processed_image(image, options)
      image = encoded_image(image, options)

      image.url(options.except(*TRANSFORMATION_OPTIONS).merge(name: name))
    rescue MissingImageFileError, WrongImageFormatError => e
      log_warning e.message
      nil
    end
1158314
def image_show(self, image_id):
        '''
        
        '''
        nt_ks = self.compute_conn
        image = nt_ks.images.get(image_id)
        links = {}
        for link in image.links:
            links[link['rel']] = link['href']
        ret = {
            'name': image.name,
            'id': image.id,
            'status': image.status,
            'progress': image.progress,
            'created': image.created,
            'updated': image.updated,
            'metadata': image.metadata,
            'links': links,
        }
        if hasattr(image, 'minDisk'):
            ret['minDisk'] = image.minDisk
        if hasattr(image, 'minRam'):
            ret['minRam'] = image.minRam

        return ret
327325
def has_image(self, digest, mime_type, index, size=500):
        """"""
        cache_key = f"img:{index}:{size}:{digest}"
        return mime_type.startswith("image/") or cache_key in self.cache
213851
def imgstatus(imgid, options={})
      params = {
        :method => WebPurify::Constants.methods[:imgstatus],
        :imgid  => imgid
      }
      parsed = WebPurify::Request.query(image_request_base, @query_base, params.merge(options))
      return parsed[:status]
    end
287021
function(imageIdentifier, callback) {
        request.get(this.getMetadataUrl(imageIdentifier), function(err, res, body) {
            callback(err, body, res);
        });

        return this;
    }
1275468
def question_image_filepath(instance, filename):
    
    return '/'.join(['images', str(instance.question_level), str(instance.question_level_id), binascii.b2a_hex(os.urandom(15)), filename])
34308
def authenticate_with_certificate(reactor, base_url, client_cert, client_key, ca_cert):
    
    return authenticate_with_certificate_chain(
        reactor, base_url, [client_cert], client_key, ca_cert,
    )
429634
function Image(src) {
  if (!(this instanceof Image)) {
    return new Image(src)
  }

  if (typeof src !== 'string') {
    throw new Error('param `src` must be a string')
  }

  var ret = reg.exec(src)

  if (!ret) {
    throw new Error('invalid param `src`')
  }

  this.src = src
  this.host = ret[1] || defaultHost
  this.version = ret[2] ? ret[2].slice(0, -1) : ''
  this.hash = ret[3]
  this.ext = ret[4]
}
48873
def image_authn(self):
        
        authn_cookie = request.cookies.get(
            self.access_cookie_name, default='[none]')
        return self.access_cookie_valid(authn_cookie, "image_authn: auth cookie")
831556
def image(id, options={})
      params = options
      get(surl('image') + id, params).body
    end
435667
public function image($image, $width=null, $height=null, $alt=null, $class=null, $link=null, $caption=null, $srcset=null) {
		$image = $this->getLink($image);
		$attributes = $this->getHtmlAttributes(array(
			'width'=>$width,
			'height'=>$height,
			'alt'=>$alt,
			'caption'=>$caption,
			'class'=>$class,
			'srcset'=>$srcset
		));

		$img = "<img src='$image'$attributes />";
		if (!is_null($link)) {
			$link = $this->getLink($link);
			return "<a href='$link'>$img</a>";
		}

		return $img;
	}
743926
def _cert_file(name, cert_type):
    '''
    
    '''
    return os.path.join(LE_LIVE, name, '{0}.pem'.format(cert_type))
709556
function ($image) {
      var href;

      if ($image[0].nodeName === "A") {
        href = $image.attr('href');
      } else {
        href = $image.parent().attr('href');
      }

      this.preload($image);

      if (href) return href;
      return $image.attr('src');
    }
236495
def convert_image_urls(html, filename)
      dir_string = ::File.dirname(::File.expand_path(filename))
      html.scan(/<img[^>]+src="([^"]+)"/).each do |url|
        html.gsub!(url[0], ::File.expand_path(url[0], dir_string)) unless url[0] =~ /^https?/
      end

      html
    end
720213
function images(user, keyPath, ipAddress, cb) {
  var cmd = [
    'sh',
    __dirname + '/scripts/getImages.sh',
    user,
    keyPath,
    ipAddress
  ].join(' ');

  logger.debug('images: ' + cmd);
  childProcess.exec(cmd, function(err, stdout, stderr) {
    logger.debug('images err: ' + err);
    logger.debug('images stdout: ' + stdout);
    logger.debug('images stderr: ' + stderr);
    cb(err, parseOutput(stdout, stderr));
  });
}
1101852
def image_show(id=None, name=None, profile=None):  # pylint: disable=C0103
    '''
    
    '''
    g_client = _auth(profile)
    ret = {}
    if name:
        for image in g_client.images.list():
            if image.name == name:
                id = image.id  # pylint: disable=C0103
                continue
    if not id:
        return {
            'result': False,
            'comment':
                'Unable to resolve image ID '
                'for name \'{0}\''.format(name)
            }
    try:
        image = g_client.images.get(id)
    except exc.HTTPNotFound:
        return {
            'result': False,
            'comment': 'No image with ID {0}'.format(id)
            }
    log.debug(
        'Properties of image %s:\n%s',
        image.name, pprint.PrettyPrinter(indent=4).pformat(image)
    )

    schema = image_schema(profile=profile)
    if len(schema.keys()) == 1:
        schema = schema['image']
    for key in schema:
        if key in image:
            ret[key] = image[key]
    return ret