欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

Java 对图片90度旋转,java90度旋转,java代码public

来源: javaer 分享于  点击 43807 次 点评:259

Java 对图片90度旋转,java90度旋转,java代码public


java代码

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<width; i++)        for(int j=0; j<height; 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<width; i++)        for(int j=0; j<height; j++)            biFlip.setRGB(j, i, bi.getRGB(i, j));    return biFlip;}
相关栏目:

用户点评