Configure Image Names
176258
function configureImageNames() {
    for (let i = 0; i < this.appsFolders.length; i++) {
        const originalImageName = this.appConfigs[i].baseName.toLowerCase();
        const targetImageName = this.dockerRepositoryName ? `${this.dockerRepositoryName}/${originalImageName}` : originalImageName;
        this.appConfigs[i].targetImageName = targetImageName;
    }
}
504010
def set_image(self):
        """"""

        if not self.image:
            scrape_image(self)

        # If still no image then use first contributor image
        if not self.image:
            contributors = self.get_primary_contributors()
            if contributors:
                self.image = contributors[0].image
                self.save(set_image=False)

        # If still not image then default
        if not self.image:
            filename = settings.STATIC_ROOT + 'music/images/default.png'
            if os.path.exists(filename):
                image = File(
                    open(filename, 'rb')
                )
                image.name = 'default.png'
                self.image = image
                self.save(set_image=False)
480973
def _setup_images(directory, brightness, saturation, hue, preserve_transparency):
        
        for file_name in os.listdir(directory):
            with open(os.path.join(directory, file_name), "rb") as fi:
                image = Image.open(fi).convert("RGBA")
            # Only perform required operations
            if brightness != 1.0:
                enhancer = ImageEnhance.Brightness(image)
                image = enhancer.enhance(brightness)
            if saturation != 1.0:
                enhancer = ImageEnhance.Color(image)
                image = enhancer.enhance(saturation)
            if hue != 1.0:
                image = imgops.shift_hue(image, hue)
            if preserve_transparency is True:
                image = imgops.make_transparent(image)
            # Save the new image
            image.save(os.path.join(directory, file_name.replace("gif", "png")))
            image.close()
        for file_name in (item for item in os.listdir(directory) if item.endswith(".gif")):
            os.remove(os.path.join(directory, file_name))
1212977
def make_thumbnail_name(image_name, extension):
    """"""
    file_name, _ = os.path.splitext(image_name)
    return file_name + '.' + clean_extension(extension)
411938
def set_image(self, user, image_path):
        """"""
        _, ext = os.path.splitext(image_path)
        shutil.copy(image_path, self._custom_image_path(user, ext))
754818
public void setImageUrlAttribute(String name, String value) {
		ensureAttributes();
		Attribute attribute = new ImageUrlAttribute(value);
		attribute.setEditable(isEditable(name));
		getAllAttributes().put(name, attribute);

	}
853151
def _set_name(self):
        """"""
        try:
            self._name = pretty(self.machine_name)
            self._serial = self.serial_number
        except AttributeError:
            self._name = None
            self._serial = None
1166783
def set_image(self, **kwargs):
        
        self.image = {
            'url': kwargs.get('url'),
            'proxy_url': kwargs.get('proxy_url'),
            'height': kwargs.get('height'),
            'width': kwargs.get('width'),
        }
1312531
private function _set_params()
    {
        // Get values from request
        $params = \Request::route('params');
        $filepath = $this->config['abs_path'] . '/' . \Request::route('imagepath');
        
        // echo $params; exit;
        
        // If enforcing params, ensure it's a match
        if ($this->config['enforce_presets'] && !in_array($params, $this->config['presets'])) {
            abort(404);
        }
        
        $image = new Image();
        $image->configure(config('image'));
        if (function_exists('exif_read_data')) {
            $this->image = $image->make($filepath)->orientate();
        } else {
            $this->image = $image->make($filepath);
        }
        
        // The parameters are separated by hyphens
        $raw_params = explode('-', $params);
        
        // Update param values from passed values
        foreach ($raw_params as $raw_param) {
            $name = $raw_param[0];
            $value = substr($raw_param, 1, strlen($raw_param) - 1);
            
            if ($name == 'c') {
                $this->url_params[$name] = TRUE;
                
                // When croping, we must have a width and height to pass to imagecreatetruecolor method
                // Make width the height or vice versa if either is not passed
                if (empty($this->url_params['w'])) {
                    $this->url_params['w'] = $this->url_params['h'];
                }
                if (empty($this->url_params['h'])) {
                    $this->url_params['h'] = $this->url_params['w'];
                }
            } elseif (key_exists($name, $this->url_params)) {
                // Remaining expected params (w, h, q)
                $this->url_params[$name] = $value;
            } else {
                // Watermarks or invalid params
                $this->url_params[$raw_param] = $raw_param;
            }
        }
        
        // Do not scale up images
        if (! $this->config['scale_up']) {
            if ($this->url_params['w'] > $this->image->width()) {
                $this->url_params['w'] = $this->image->width();
            }
            if ($this->url_params['h'] > $this->image->height()) {
                $this->url_params['h'] = $this->image->height();
            }
        }
        
        // Must have at least a width or height
        if (empty($this->url_params['w']) and empty($this->url_params['h'])) {
            throw new HTTP_Exception_404('The requested URL :uri was not found on this server.', array(
                ':uri' => Request::$current->uri()
            ));
        }
        
        // Set the url filepath
        $this->source_file = $filepath;
    }
66197
def image_name (txt):
    """"""
    mo = imgtag_re.search(txt)
    if mo:
        name = strformat.unquote(mo.group('name').strip())
        return  _unquote(name)
    return u''
56194
protected function setDataImagesIndexPage()
    {
        $options = array(
            'imagestyle' => $this->configTheme('image_style_page', 5)
        );

        $this->setItemThumb($this->data_page, $this->image, $options);
        $this->setData('images', $this->render('page/images', array('page' => $this->data_page)));
    }
1275621
public void setImageUrlAttribute(String name, String value) {
		ensureValue();
		Attribute attribute = new ImageUrlAttribute(value);
		attribute.setEditable(isEditable(name));
		getValue().getAllAttributes().put(name, attribute);
	}
816487
def namer(cls, imageUrl, pageUrl):
        """"""
        num = pageUrl.split('/')[-1]
        ext = imageUrl.rsplit('.', 1)[1]
        return "thethinhline-%s.%s" % (num, ext)
272344
def namer(cls, imageUrl, pageUrl):
        """"""
        parts, year, month, stripname = pageUrl.rsplit('/', 3)
        stripname = stripname.rsplit('.', 1)[0]
        parts, imagename = imageUrl.rsplit('/', 1)
        return '%s-%s-%s-%s' % (year, month, stripname, imagename)
992122
def parse_image_name(self, image):
        '''
             

        '''
        self._image = image
        self.uri = self.get_uri(image)
        self.image = self.remove_uri(image)
676356
def avail_images():
    '''
    
    '''
    response = _query('grid', 'image/list')

    ret = {}
    for item in response['list']:
        name = item['friendlyName']
        ret[name] = item

    return ret
857261
def image_name(image, key='name', clear=True):
    
    if hasattr(image, 'translation') and image.translation:
        return getattr(image.translation, key)

    if hasattr(image, key) and getattr(image, key):
        return getattr(image, key)

    try:
        name = IMAGE_NAME.match(image.original_filename).group()
    except IndexError:
        return ''
    else:
        name = name[:-1]
        if clear:
            return name.replace("_", " ").replace("-", " ")
        return name