()
| 7992 | /// |
| 7993 | /// the encoded image or null if the operation failed |
| 7994 | public Image toImage() { |
| 7995 | if (Image.isAlphaMutableImageSupported()) { |
| 7996 | Image img = ImageFactory.createImage(null, width, height, 0); |
| 7997 | Graphics g = img.getGraphics(); |
| 7998 | g.drawImage(this, 0, 0); |
| 7999 | return img; |
| 8000 | } |
| 8001 | return null; |
| 8002 | } |
| 8003 | |
| 8004 | /// {@inheritDoc} |
| 8005 | @Override |