2024年4月14日发(作者:)
package img;
import edImage;
import ;
import tFoundException;
import ption;
import O;
public class ImgSub
{
public static void main(String[] args)
{
String input = "D:";
String output = "D:";
BufferedImage img = readBufferedImage(input); //读取源图
int startX = 0,startY = 0; //截图的起点
int subWidth = th()-100,subHeight = ght()-100 ; //截图
后的大小
BufferedImage outImg =
BufferedImage(subWidth,subHeight,_INT_RGB);
subImage(img, outImg, startX, startY, subWidth, subHeight);
writeImg(output, outImg); //写出截好的图片
}
public static void subImage(BufferedImage src,BufferedImage
startX,int startY,int subWidth,int subHeight)
{
int i=0,j=0;
try
{
for(i=0;i< subWidth;i++) //循环行 y坐标
new
dest,int
发布者:admin,转转请注明出处:http://www.yc00.com/web/1713109409a2184809.html
评论列表(0条)