Adds an image resource to be watched.
193925
public void add(Image image) {
    assert !start || listener == null;
    ++total;
    image.addCallback(callback);
  }
950518
public void setImage(Resource resource)
    {
        ImageIcon image = null;
        if (resource != null && resource.exists())
        {
            try
            {
                image = new ImageIcon(resource.getURL());
            }
            catch (IOException e)
            {
                logger.warn("Error reading resource: " + resource);
                throw new RuntimeException("Error reading resource " + resource, e);
            }
        }
        setImage(image);
    }
1291039
def add_image(image)
      raise ArgumentError, "Invalid argument 'image'. Expected Image, got #{image.class}." unless image.is_a?(Image)
      @images << image unless @associated_images[image.uid]
      @associated_images[image.uid] = image
      @image_positions[image.pos_slice.round(2)] = image
    end
636834
def _add_image(collection, image):
    '''
    
    '''
    image_prep = {
            'id': image.id,
            'name': image.name,
            'created_at': image.created_at,
            'file': image.file,
            'min_disk': image.min_disk,
            'min_ram': image.min_ram,
            'owner': image.owner,
            'protected': image.protected,
            'status': image.status,
            'tags': image.tags,
            'updated_at': image.updated_at,
            'visibility': image.visibility,
        }
    # Those cause AttributeErrors in Icehouse' glanceclient
    for attr in ['container_format', 'disk_format', 'size']:
        if attr in image:
            image_prep[attr] = image[attr]
    if type(collection) is dict:
        collection[image.name] = image_prep
    elif type(collection) is list:
        collection.append(image_prep)
    else:
        msg = '"collection" is {0}'.format(type(collection)) +\
            'instead of dict or list.'
        log.error(msg)
        raise TypeError(msg)
    return collection
1035154
def add_to_watched(self, watched):
        
        assert isinstance(watched, github.Repository.Repository), watched
        headers, data = self._requester.requestJsonAndCheck(
            "PUT",
            "/repos/" + watched._identity + "/subscription",
            input={"subscribed": True}
        )
1039774
def image_update_properties(request, image_id, remove_props=None, **kwargs):
    """"""
    return glanceclient(request, '2').images.update(image_id,
                                                    remove_props,
                                                    **kwargs)
550395
def on_art_source(self, *args):
        
        if self.art_source:
            self.art_image = Image(source=self.art_source)
696789
def dispatch(self, request, *args, **kwargs):
        """"""
        self._add_next_and_user(request)
        return super(UpdateImageView, self).dispatch(request, *args, **kwargs)
530215
protected function addImageStyle()
    {
        $this->controlAccess('image_style_add');

        if ($this->image_style->add($this->getSubmitted())) {
            $this->redirect('admin/settings/imagestyle', $this->text('Image style has been added'), 'success');
        }

        $this->redirect('', $this->text('Image style has not been added'), 'warning');
    }
542720
public void loadImage() throws InterruptedException {
		synchronized(this) {
			status=0;
			image.getSource().startProduction(this);
			while((status&(IMAGEABORTED|IMAGEERROR|SINGLEFRAMEDONE|STATICIMAGEDONE))==0) {
				wait();
			}
		}
	}
1081987
def update(self, newinfo):
        ''''''
        self.imgstr = newinfo.imgstr
        self.width = newinfo.width
        self.height = newinfo.height
        if self.imgpanel is not None:
            self.imgpanel.set_image(self.img())
1114651
def add_watched_directory(self, dir_path):
    
    req = ApiWatchedDir(self._get_resource_root(), path=dir_path)
    return self._post("watcheddir", ApiWatchedDir, data=req, api_version=14)
408267
def add_image(self, figure, dpi=72):
        '''
        
        '''
        name = os.path.join(self._dir, '/fig%s.png' % self.fig_counter)
        self.fig_counter += 1
        figure.savefig(name, dpi=dpi)
        plt.close(figure)
        self.body += '<img src="%s" />\n' % name
757077
private function addImageSizes()
    {
        $data = $this->getData();
        foreach ($data as $slug => $props)
        {
            add_image_size($slug, $props['width'], $props['height'], $props['crop']);
        }
    }
411938
def set_image(self, user, image_path):
        """"""
        _, ext = os.path.splitext(image_path)
        shutil.copy(image_path, self._custom_image_path(user, ext))
5537
def show_image(self, name):
        """"""
        command = "%s.show()" % name
        sw = self.shellwidget
        if sw._reading:
            sw.kernel_client.input(command)
        else:
            sw.execute(command)
664866
def display(self, image):
        
        assert(image.size == self.size)

        self.image = self.preprocess(image).copy()