/**
* 获取网络图片的宽和高
* @param url
* @return
*/
public static String getWidthAndHeight(String url) {
try {
InputStream is = new URL(url).openStream();
BufferedImage sourceImg = ImageIO.read(is);
int width = sourceImg.getWidth();
int height = sourceImg.getHeight();
return width+"*"+height;
} catch (IOException e) {
log.error("获取图片宽高失败");
e.printStackTrace();
}
return "";
}