Here you can find the source of verifyImageSizeBigger(byte[] imageData, int maxDim)
public static Boolean verifyImageSizeBigger(byte[] imageData, int maxDim)
//package com.java2s; /*/*from w ww. j a va 2 s . co m*/ * Copyright (c) UChicago Argonne, LLC. All rights reserved. * See LICENSE file. */ import javax.swing.ImageIcon; import java.awt.Image; public class Main { public static Boolean verifyImageSizeBigger(byte[] imageData, int maxDim) { ImageIcon imageIcon = new ImageIcon(imageData); Image inImage = imageIcon.getImage(); int origWidth = inImage.getWidth(null); int origHeight = inImage.getHeight(null); return ((origWidth > maxDim) && (origHeight > maxDim)); } }