Stores an image on the storage

@param image       the image to store.
@param pictureFile the file in which it must be stored
192282
public static void storeImage(Bitmap image, File pictureFile) {
        if (pictureFile == null) {
            QuickUtils.log.d("Error creating media file, check storage permissions: ");
            return;
        }
        try {
            FileOutputStream fos = new FileOutputStream(pictureFile);
            image.compress(Bitmap.CompressFormat.PNG, 90, fos);
            fos.close();
        } catch (FileNotFoundException e) {
            QuickUtils.log.d("File not found: " + e.getMessage());
        } catch (IOException e) {
            QuickUtils.log.d("Error accessing file: " + e.getMessage());
        }
    }
602759
public void setImage(final GVRImage imageData)
    {
        mImage = imageData;
        if (imageData != null)
            NativeTexture.setImage(getNative(), imageData, imageData.getNative());
        else
            NativeTexture.setImage(getNative(), null, 0);
    }
272738
public void setBufferedImage(BufferedImage img) {
        image = img;
        width = img.getWidth();
        height = img.getHeight();
        updateColorArray();
    }
90434
private void processImageOuter( ImageBase image ) {
		long startTime = System.currentTimeMillis();

		// this image is owned by only this process and no other. So no need to lock it while
		// processing
		processImage(image);

		// If an old image finished being processes after a more recent one it won't be visualized
		if( !visualizeOnlyMostRecent || startTime > timeOfLastUpdated ) {
			timeOfLastUpdated = startTime;

			// Copy this frame
			renderBitmapImage(bitmapMode,image);

			// Update the visualization
			runOnUiThread(() -> displayView.invalidate());
		}

		// Put the image into the stack if the image type has not changed
		synchronized (boofImage.imageLock) {
			if( boofImage.imageType.isSameType(image.getImageType()))
				boofImage.stackImages.add(image);
		}
	}
879975
public void setImage(T image) {
		blur.reshape(image.width,image.height);
		filterBlur.process(image,blur);
		describe.setImage(image);
	}
312655
function storeScreenShot(data, file) {
	var stream = fs.createWriteStream(file);

	stream.write(new Buffer(data, 'base64'));
	stream.end();
}
506892
public void writeTiff() {
		if (directory.getWriteRasters() != null) {
			TIFFImage tiffImage = new TIFFImage();
			tiffImage.add(directory);
			try {
				imageBytes = TiffWriter.writeTiffToBytes(tiffImage);
			} catch (IOException e) {
				throw new GeoPackageException("Failed to write TIFF image", e);
			}
		}
	}
810579
public void setImageService(
		com.liferay.portal.kernel.service.ImageService imageService) {
		this.imageService = imageService;
	}
1180965
@Override
	public void process( T image ) {
		// initialize data structures
		this.image = image;
		this.stopRequested = false;

		modeLocation.reset();
		modeColor.reset();
		modeMemberCount.reset();

		interpolate.setImage(image);

		pixelToMode.reshape(image.width, image.height);
		quickMode.reshape(image.width, image.height);
		// mark as -1 so it knows which pixels have been assigned a mode already and can skip them
		ImageMiscOps.fill(pixelToMode, -1);
		// mark all pixels are not being a mode
		ImageMiscOps.fill(quickMode,-1);

		// use mean shift to find the peak of each pixel in the image
		int indexImg = 0;
		for( int y = 0; y < image.height&& !stopRequested; y++ ) {
			for( int x = 0; x < image.width; x++ , indexImg++) {
				if( pixelToMode.data[indexImg] != -1 ) {
					int peakIndex = pixelToMode.data[indexImg];
					modeMemberCount.data[peakIndex]++;
					continue;
				}

				float meanColor = interpolate.get(x, y);
				findPeak(x,y, meanColor);

				// convert mean-shift location into pixel index
				int modeX = (int)(this.modeX +0.5f);
				int modeY = (int)(this.modeY +0.5f);

				int modePixelIndex = modeY*image.width + modeX;

				// get index in the list of peaks
				int modeIndex = quickMode.data[modePixelIndex];
				// If the mode is new add it to the list
				if( modeIndex < 0 ) {
					modeIndex = this.modeLocation.size();
					this.modeLocation.grow().set(modeX, modeY);
					// Save the peak's color
					modeColor.grow()[0] = meanGray;
					// Mark the mode in the segment image
					quickMode.data[modePixelIndex] = modeIndex;
					// Set the initial count to zero. This will be incremented when it is traversed later on
					modeMemberCount.add(0);
				}

				// add this pixel to the membership list
				modeMemberCount.data[modeIndex]++;

				// Add all pixels it traversed through to the membership of this mode
				// This is an approximate of mean-shift
				for( int i = 0; i < history.size; i++ ) {
					Point2D_F32 p = history.get(i);
					int px = (int)(p.x+0.5f);
					int py = (int)(p.y+0.5f);

					int index = pixelToMode.getIndex(px,py);
					if( pixelToMode.data[index] == -1 ) {
						pixelToMode.data[index] = modeIndex;
					}
				}
			}
		}
	}
352749
private static void save(Bitmap src, String fileName, Bitmap.CompressFormat format, int quality) throws ImageSaveException {
        FileOutputStream outputStream = null;
        try {
            outputStream = new FileOutputStream(fileName);
            src.compress(format, quality, outputStream);
            outputStream.close();
        } catch (IOException e) {
            throw new ImageSaveException(e);
        } finally {
            if (outputStream != null) {
                try {
                    outputStream.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        }
    }
1035898
public static BufferedImage copyImage(BufferedImage image)
    {
        final BufferedImage copy = createImage(image.getWidth(),
                                               image.getHeight(),
                                               image.getColorModel().getTransparency());
        final Graphics2D g = copy.createGraphics();
        g.setComposite(AlphaComposite.Src);
        g.drawImage(image, 0, 0, null);
        g.dispose();
        return copy;
    }
598250
public BufferedImage copyImage(BufferedImage image) {
        BufferedImage newImage = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());
        Graphics2D g2d = newImage.createGraphics();
        g2d.drawImage(image, 0, 0, null);
        g2d.dispose();
        return newImage;
    }
524573
protected function isFileActual($file, Picture $picture)
    {
        if(file_exists($file))
        {
            if(@filemtime($file) === @filemtime($picture->getImage()))
            {
                return TRUE;
            }
            else
            {
                return NULL;
            }
        }

        return FALSE;
    }
1355124
public void setImageLocalService(
		com.liferay.portal.kernel.service.ImageLocalService imageLocalService) {
		this.imageLocalService = imageLocalService;
	}
112193
public static BufferedImage copy(BufferedImage image) {
        BufferedImage newImage = new BufferedImage(image.getWidth(), image.getHeight(),
            image.getType());
        return copy(image, newImage);
    }
33732
public void setTileSetImage(Image image) {
		tiles = new SpriteSheet(image, tileWidth, tileHeight, tileSpacing,
				tileMargin);
		tilesAcross = tiles.getHorizontalCount();
		tilesDown = tiles.getVerticalCount();

		if (tilesAcross <= 0) {
			tilesAcross = 1;
		}
		if (tilesDown <= 0) {
			tilesDown = 1;
		}

		lastGID = (tilesAcross * tilesDown) + firstGID - 1;
	}
254406
public void update( ImageGray image ) {
		if( approximateHistogram ) {
			for (int i = 0; i < bins.length; i++)
				bins[i] = 0;

			if (image instanceof GrayF32)
				update((GrayF32) image);
			else if (GrayI.class.isAssignableFrom(image.getClass()))
				update((GrayI) image);
			else
				throw new IllegalArgumentException("Image type not yet supported");
		} else {
			GImageStatistics.histogram(image,0,bins);
		}
	}