Examples of CropImageFilter


Examples of java.awt.image.CropImageFilter

                BufferedImage tag;
                Image image = bi.getScaledInstance(srcWidth, srcHeight,Image.SCALE_DEFAULT);
                // 四个参数分别为图像起点坐标和宽高
                // 即: CropImageFilter(int x,int y,int width,int height)
               
                cropFilter = new CropImageFilter(x, y, width, height);
                img = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(image.getSource(), cropFilter));
                int type = BufferedImage.TYPE_INT_ARGB;
                tag = new BufferedImage(width, height,type);
                Graphics2D g = (Graphics2D)tag.getGraphics();
                   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.