File file = dialog.showOpenFileDialog(this, null);
if (file != null) {
if (file.toString().toLowerCase().endsWith(".svg")) {
SVGtoBufferedImageConverter converter = new SVGtoBufferedImageConverter();
BufferedImage bi = converter.renderSVG(file.toString());
picture = new DcImageIcon(Utilities.getBytes(new DcImageIcon(bi)));
} else {
String filename = file.toString().toLowerCase();
picture = new DcImageIcon(Utilities.getBytes(
Toolkit.getDefaultToolkit().createImage(Utilities.readFile(file)),