Return to Snippet

Revision: 1736
at November 10, 2006 00:09 by whitetiger


Updated Code
public BufferedImage zoomIn(BufferedImage bi, int scale)
	{
		int width = scale * bi.getWidth();
		int height = scale * bi.getHeight();
		
		BufferedImage biScale = new BufferedImage(width, height, bi.getType());
		
                // Cicla dando un valore medio al pixel corrispondente
		for(int i=0; i<width; i++)
			for(int j=0; j<height; j++)
				biScale.setRGB(i, j, bi.getRGB(i/scale, j/scale));
		
		return biScale;
	}

Revision: 1735
at November 9, 2006 23:54 by whitetiger


Initial Code
public BufferedImage zoomIn(BufferedImage bi, int scale)
	{
		int width = scale * bi.getWidth();
		int height = scale * bi.getHeight();
		
		BufferedImage biScale = new BufferedImage(width, height, bi.getType());
		
                // Cicla dando un valore medio al pixel corrispondente
		for(int i=0; i<width; i++)
			for(int j=0; j<height; j++)
				biScale.setRGB(i, j, bi.getRGB(i/scale, j/scale));
		
		return biScale;
	}

Initial URL

                                

Initial Description

                                

Initial Title
Java - ZoomIN Image

Initial Tags
image, java, filter, images

Initial Language
Java