Passar parametros para metodo Img

0 respostas
progJava

Como passo os parametro para esse metodo pegando texto de um Jtext Field

public static Image resizeImage(Image im, int with)   
    {   
  
        double proporcao = with / (double) im.getWidth(null);   
        int newHeigth = (int)(im.getHeight(null) * proporcao);   
  
        BufferedImage bum = new BufferedImage(with, newHeigth, BufferedImage.TYPE_INT_ARGB);   
  
        Graphics2D graf = bum.createGraphics();   
  
        graf.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);   
        graf.drawImage(im, 0,0, with, newHeigth, null);   
        graf.dispose();   
  
        return bum;   
    }
Criado 22 de dezembro de 2010
Respostas 0
Participantes 1