Sprite sp = new Sprite(getSpriteInfo(HackModule.getNumberOfString( selector.getSelectedItem().toString(), false)), this); ImageIO.write(sp.getImage(), "png", f);
ImageIO.write((BufferedImage) spriteDrawingArea.getImage(), "png", f);
    public void exportImg(File f)    {        if (f == null)            return;        if (!f.getAbsolutePath().endsWith(".png"))        {            f = new File(f.getAbsolutePath() + ".png");        }        try        {            Sprite sp = new Sprite(getSpriteInfo(HackModule.getNumberOfString(                selector.getSelectedItem().toString(), false)), this);            ImageIO.write(sp.getImage(), "png", f);        }        catch (IOException e)        {            System.out.println("Unable to read image: " + f.toString());            e.printStackTrace();        }    }