| | |
| | | * @throws InterruptedException |
| | | * @throws IM4JavaException |
| | | */ |
| | | public static void main(String[] args) throws IOException, InterruptedException, IM4JavaException{ |
| | | // public static void main(String[] args) throws IOException, InterruptedException, IM4JavaException{ |
| | | // String inImgPath = "D:\\Documents\\Pictures\\1.jpg"; |
| | | // String outImgPath = "D:\\Documents\\Pictures\\2.jpg"; |
| | | Img4JavaUtil test = new Img4JavaUtil(); |
| | | // Img4JavaUtil test = new Img4JavaUtil(); |
| | | // 中心化缩略图(常用) |
| | | // test.thumbnailImg(inImgPath,outImgPath,400,400,"c"); |
| | | // 裁剪图片 |
| | |
| | | // 自动中心化裁剪 |
| | | // test.cropCenterImg(inImgPath,outImgPath+"中心.jpg",400,300); |
| | | |
| | | } |
| | | // } |
| | | } |
| | |
| | | * @throws IOException |
| | | * @throws InterruptedException |
| | | * @throws IM4JavaException |
| | | */ |
| | | |
| | | public static void main(String[] args) throws IOException, InterruptedException, IM4JavaException{ |
| | | String inImgPath = "D:\\Documents\\Pictures\\1.jpg"; |
| | | String outImgPath = "D:\\Documents\\Pictures\\2.jpg"; |
| | |
| | | // test.scaleImg(inImgPath,outImgPath+"缩略图scale.jpg",100,null); |
| | | // 自动中心化裁剪 |
| | | // test.cropCenterImg(inImgPath,outImgPath+"中心.jpg",400,300); |
| | | |
| | | } |
| | | */ |
| | | } |