获取图片信息:
File _file = new File("example.jpg"); //读入文件
BufferedImage src = javax.imageio.ImageIO.read(_file); //构造Image对象
int width = src.getWidth(null); //得到源图宽
int height = src.getHeight(null); //得到源图长