frames[framesx*y+x] = createImage(new FilteredImageSource(img.getSource(), new CropImageFilter(x*map.getTileWidth(), y*map.getTileHeight(), map.getTileWidth(), map.getTileHeight())));
}
}
//TODO add delay input through dialog
newTile.setSprite(new Sprite(frames, 10)); //chopped up animation
newTile.setImage(id); //complete animation
tileset.addNewTile(newTile);
queryTiles();
queryImages();
// Select the last (cloned) tile