Save this image to another DockerImage

        :param image: DockerImage
        :return:
11245
def save_to(self, image):
        
        if not isinstance(image, self.__class__):
            raise ConuException("Invalid target image type", type(image))
        self.copy(image.name, image.tag,
                  target_transport=image.transport, target_path=image.path,
                  logs=False)
257008
public BufferedImage put(IconRow iconRow, BufferedImage image) {
		return put(iconRow.getId(), image);
	}
1185255
def addImage(self, image, mask=None):
        '''
        
        '''
        self._last_diff = diff = image - self.noSTE

        ste = diff > self.threshold
        removeSinglePixels(ste)

        self.mask_clean = clean = ~ste

        if mask is not None:
            clean = np.logical_and(mask, clean)

        self.mma.update(image, clean)

        if self.save_ste_indices:
            self.mask_STE += ste

        return self
1133518
def add_image(image)
      raise ArgumentError, "Invalid argument 'image'. Expected Image, got #{image.class}." unless image.is_a?(Image)
      @images << image unless @frame.image(image.uid)
      @slices[image.uid] = image.pos_slice
      @image_positions[image.pos_slice.round(2)] = image
      @sop_uids[image.pos_slice] = image.uid
      # The link between image uid and image instance is kept in the Frame, instead of the ImageSeries:
      @frame.add_image(image) unless @frame.image(image.uid)
    end
1351066
def pull_image(self, name, tag='latest'):
        
        name = "{0}/{1}:{2}".format(DOCKER_NEG, name, tag)
        return "/dockerapi/v2/images", dict(image=name)
200163
def put_photo(self, image, album_path="me/photos", **kwargs):
        
        return self.request(
            "{0}/{1}".format(self.version, album_path),
            post_args=kwargs,
            files={"source": image},
            method="POST",
        )
1082775
def _save_image(fig, filename, filetype='png', resolution=300):
    
    if filename:
        filename, filetype, resolution = build_filename(filename,
                                                        filetype,
                                                        resolution)
        fig.savefig(filename, dpi=resolution, format=filetype)
    else:
        pass
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
1224561
def process_image(self, decorator):
        
        savefig_dir = self.savefig_dir
        source_dir = self.source_dir
        saveargs = decorator.split(' ')
        filename = saveargs[1]
        # insert relative path to image file in source
        outfile = os.path.relpath(os.path.join(savefig_dir,filename),
                    source_dir)

        imagerows = ['.. image:: %s'%outfile]

        for kwarg in saveargs[2:]:
            arg, val = kwarg.split('=')
            arg = arg.strip()
            val = val.strip()
            imagerows.append('   :%s: %s'%(arg, val))

        image_file = os.path.basename(outfile) # only return file name
        image_directive = '\n'.join(imagerows)
        return image_file, image_directive
421589
def save_intermediate_img(self, img, name):
        """"""
        if self.intermediate_results:
            img.writeto(name, overwrite=True)
442365
def convert_image(from_file, to_file, image_format):
    """"""
    with Image(filename=from_file) as original:
        with original.convert(image_format) as converted:
            converted.save(filename=to_file)
    return to_file
459614
def save(self, **kwargs):
        
        self.remove_file()
        if not self.image:
            self.generate(save=False)
        else:
            self.image.name = self.file()
        super(FormatedPhoto, self).save(**kwargs)
1300964
def serialize(self, image):
        
        pic = mutagen.flac.Picture()
        pic.data = image.data
        pic.type = image.type_index
        pic.mime = image.mime_type
        pic.desc = image.desc or u''

        # Encoding with base64 returns bytes on both Python 2 and 3.
        # Mutagen requires the data to be a Unicode string, so we decode
        # it before passing it along.
        return base64.b64encode(pic.write()).decode('ascii')
8080
def pull(self):
        
        for json_e in self.d.pull(repository=self.name, tag=self.tag, stream=True, decode=True):
            logger.debug(json_e)
            status = graceful_get(json_e, "status")
            if status:
                logger.info(status)
            else:
                error = graceful_get(json_e, "error")
                logger.error(status)
                raise ConuException("There was an error while pulling the image %s: %s",
                                    self.name, error)
        self.using_transport(SkopeoTransport.DOCKER_DAEMON)
931712
def savepoint(self):
        
        if self._last_image:
            self._savepoints.append(self._last_image)
            self._last_image = None
112193
public static BufferedImage copy(BufferedImage image) {
        BufferedImage newImage = new BufferedImage(image.getWidth(), image.getHeight(),
            image.getType());
        return copy(image, newImage);
    }
87982
public function save($image, $options)
    {
        $image = $this->saveToString($image, $options);
        return $this->saveFromString($image, $options);
    }