public BufferedImage rotate90DX(BufferedImage bi)
{
int width = bi.getWidth();
int height = bi.getHeight();
BufferedImage biFlip = new BufferedImage(height, width, bi.getType());
for(int i=0; i
for(int j=0; j
biFlip.setRGB(height-1-j, width-1-i, bi.getRGB(i, j));
return biFlip;
}
public BufferedImage rotate90SX(BufferedImage bi)
{
int width = bi.getWidth();
int height = bi.getHeight();
BufferedImage biFlip = new BufferedImage(height, width, bi.getType());
for(int i=0; i
for(int j=0; j
biFlip.setRGB(j, i, bi.getRGB(i, j));
return biFlip;
}
关注微信号:javalearns 随时随地学Java
或扫一扫
随时随地学Java