Upgrader for L{Mugshot} from version 2 to version 3, which re-thumbnails
    the mugshot to take into account the new value of L{Mugshot.smallerSize}.
493794
def mugshot2to3(old):
    
    new = old.upgradeVersion(Mugshot.typeName, 2, 3,
                             person=old.person,
                             type=old.type,
                             body=old.body,
                             smallerBody=old.smallerBody)
    new.smallerBody = new.makeThumbnail(
        new.body.open(), new.person, new.type[len('image/'):], smaller=True)
    return new
764164
def do_upgrade():
    """"""
    op.alter_column(
        table_name='knwKBRVAL',
        column_name='id_knwKB',
        type_=db.MediumInteger(8, unsigned=True),
        existing_nullable=False,
        existing_server_default='0'
    )
1211462
def expand(self, new_size):
        
        ret = self.size_total
        resp = self.modify(size=new_size)
        resp.raise_if_err()
        return ret
878822
def transform(self, **kwds):
        
        result = self._client.photo.transform(self, **kwds)
        self._replace_fields(result.get_fields())
288148
def _upgrade_frame(self):
        

        # turn 2.2 into 2.3/2.4 tags
        if len(type(self).__name__) == 3:
            base = type(self).__base__
            if base is Frame:
                return
            return base(self)
        else:
            return self
738422
def upgrade_v16_to_v17(storage: SQLiteStorage, old_version: int, current_version: int, **kwargs):
    
    if old_version == SOURCE_VERSION:
        _transform_snapshots(storage)

    return TARGET_VERSION
968755
public static void changeMarkSize( Rule rule, int newSize ) {
        PointSymbolizer pointSymbolizer = StyleUtilities.pointSymbolizerFromRule(rule);
        Graphic graphic = SLD.graphic(pointSymbolizer);
        graphic.setSize(ff.literal(newSize));
        // Mark oldMark = SLDs.mark(pointSymbolizer);
        // oldMark.setSize(ff.literal(newSize));
        // Graphic graphic = SLDs.graphic(pointSymbolizer);
    }
561143
def _increase(self, resource):
        
        original_width, original_height = resource.size

        target_width = original_width + self.value
        target_height = original_height + self.value

        resource = resource.resize((target_width, target_height), Image.ANTIALIAS)

        return resource
892089
private void resize()
    {
        Entry[] oldTab = table;
        int oldLen = oldTab.length;
        int newLen = oldLen * 2;
        Entry[] newTab = new Entry[newLen];
        int count = 0;

        for (int j = 0; j < oldLen; ++j)
        {
            Entry e = oldTab[j];
            if (e != null)
            {
                int h = e.key.hashCode & (newLen - 1);
                while (newTab[h] != null)
                    h = nextIndex(h, newLen);
                newTab[h] = e;
                count++;
            }
        }

        setThreshold(newLen);
        size = count;
        table = newTab;
    }
331442
function updateIYL(minY, i, ih) {
    // Remove siblings that are hidden by the new subtree.  
    while (ih != null && minY >= ih.lowY) ih = ih.nxt;                 
    // Prepend the new subtree.  
    return {
      lowY: minY, 
      index: i, 
      nxt: ih,
    };                                       
  }
1244519
def resize(self, image, size):
        
        (width, height, force) = size

        if image.size[0] > width or image.size[1] > height:
            if force:
                return ImageOps.fit(self.image, (width, height), Image.ANTIALIAS)
            else:
                thumb = self.image.copy()
                thumb.thumbnail((width, height), Image.ANTIALIAS)
                return thumb

        return image
175376
def rebase(image)
      new_path = @router.baseline_dir(image.name)

      create_path_for_file(new_path)
      FileUtils.move(image.path, new_path)

      Monet::Image.new(new_path)
    end
949261
def update(self, photo, **kwds):
        
        result = self._client.post("/photo/%s/update.json" %
                                   self._extract_id(photo),
                                   **kwds)["result"]
        return Photo(self._client, result)
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())
1186589
function updateImageSizeHTML(editor, model) {
	const pos = editor.getCursorBufferPosition();
	const src = getImageSrcHTML( getImageHTMLNode(editor, model, pos) );

	if (!src) {
		return Promise.reject(new Error('No valid image source'));
	}

	locateFile(editor, src)
	.then(getImageSize)
	.then(size => {
		// since this action is asynchronous, we have to ensure that editor wasn’t
		// changed and user didn’t moved caret outside <img> node
		const img = getImageHTMLNode(editor, model, pos);
		if (getImageSrcHTML(img) === src) {
			updateHTMLTag(editor, img, size.width, size.height);
		}
	})
	.catch(err => console.warn('Error while updating image size:', err));
}
1232945
def on_size(self, event):
        ''''''
        state = self.state
        self.need_redraw = True
        if state.report_size_changes:
            # tell owner the new size
            size = self.frame.GetSize()
            if size != self.last_size:
                self.last_size = size
                state.out_queue.put(MPImageNewSize(size))
963280
function updateImageSizeCSS(editor, model) {
	const pos = editor.getCursorBufferPosition();
	const property = getImageCSSNode(editor, model, pos);
	const urlToken = findUrlToken(property, pos);
	const src = urlToken && getImageSrcCSS(urlToken);

	if (!src) {
		return Promise.reject(new Error('No valid image source'));
	}

	locateFile(editor, src)
	.then(getImageSize)
	.then(size => {
		// since this action is asynchronous, we have to ensure that editor wasn’t
		// changed and user didn’t moved caret outside <img> node
		if (getImageCSSNode(editor, model, pos) === property) {
			updateCSSNode(editor, property, size.width, size.height);
		}
	})
	.catch(err => console.warn('Error while updating image size:', err));
}