Posted By

whitetiger on 11/09/06


Tagged

image jpg java rotate filter images Converter RGB j2me gray flip half zoom


Versions (?)

Java - ZoomOUT image


 / Published in: Java
 

  1. public BufferedImage zoomOut(BufferedImage bi, int scale)
  2. {
  3. int width = bi.getWidth() / scale;
  4. int height = bi.getHeight() / scale;
  5.  
  6. BufferedImage biScale = new BufferedImage(width, height, bi.getType());
  7.  
  8. for(int i=0; i<width; i++)
  9. for(int j=0; j<height; j++)
  10. biScale.setRGB(i, j, bi.getRGB(i*scale, j*scale));
  11.  
  12. return biScale;
  13. }

Report this snippet  

You need to login to post a comment.