Java Image verifyImageSizeBigger(byte[] imageData, int maxDim)

Here you can find the source of verifyImageSizeBigger(byte[] imageData, int maxDim)

Description

verify Image Size Bigger

License

Open Source License

Declaration

public static Boolean verifyImageSizeBigger(byte[] imageData, int maxDim) 

Method Source Code

//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));
    }
}

Related

  1. showImage(Image image, String title)
  2. sizeToImage(JComponent component, Image image)
  3. swapColor(Image image, Color imageColor, Color newColor)
  4. texturePaintHorizontal(JComponent parent, Graphics g, Image image, Rectangle areaToPaint)
  5. usesAlpha(Image image)