Java ImageIcon getHeight(ImageIcon imagen)

Here you can find the source of getHeight(ImageIcon imagen)

Description

Obtiene el alto de un IconImage

License

Open Source License

Declaration

public static int getHeight(ImageIcon imagen) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.*;

import javax.swing.*;

public class Main {
    /**//from www  .  j  a  v a 2  s . c  o m
     * Obtiene el alto de una Image
     */
    public static int getHeight(Image imagen) {
        int height = new ImageIcon(imagen).getIconHeight();
        return height;
    }

    /**
     * Obtiene el alto de un IconImage
     */
    public static int getHeight(ImageIcon imagen) {
        return imagen.getIconHeight();
    }
}

Related

  1. fitToSquare(ImageIcon icon, int newSize)
  2. generateImageIcon(Color color, int size, Insets insets)
  3. getBorderedIcon(ImageIcon icon)
  4. getByteImage(ImageIcon icon)
  5. getDisabledIcon(ImageIcon icon)
  6. getOpenSwingImage(String name, ImageIcon defaultIcon)
  7. getRenderedImage(ImageIcon icon)
  8. getSizeOfImage(ImageIcon imgIn)
  9. getThumbImage(ImageIcon myLoadedImageIcon, int thumbHeight, int thumbWidth)