Revision 1275 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/layout/fframes/dialogs/FFramePictureDialog.java
FFramePictureDialog.java | ||
---|---|---|
314 | 314 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
315 | 315 |
try { |
316 | 316 |
Image image = new ImageIcon(getTFichero().getText()).getImage(); |
317 |
if (image.getWidth(null)!=-1){ |
|
317 | 318 |
BufferedImage bi = new BufferedImage((int) image.getWidth( |
318 | 319 |
null), (int) image.getHeight(null), |
319 | 320 |
BufferedImage.TYPE_INT_RGB); |
320 | 321 |
Graphics2D biContext = bi.createGraphics(); |
321 | 322 |
biContext.drawImage(image, 0, 0, null); |
322 | 323 |
fframepicture.setImage(bi); |
324 |
} |
|
323 | 325 |
} catch (Exception ex) { |
324 | 326 |
NotificationManager.addError("Excepci?n :", ex); |
325 | 327 |
} |
Also available in: Unified diff