public void removeImageData(Rectangle rect, boolean autoRemove){
		ImageData match = null;
		for(Iterator<ImageData> it = imgs.iterator(); it.hasNext();){
			ImageData iData = it.next();
			if (rect.equals(iData.getRect())){
				match = iData;
				JPanel p = (JPanel) iData.getButton().getParent();
				p.remove(iData.getButton());
				p.invalidate();
				p.repaint();
				if (match != null && autoRemove){
					imgs.remove(match);
				}
				MainWindow.MAIN_WINDOW.getCanvas().repaint();
				break;
			}
		}
		
		if (match == null){
			System.out.println("Could not find image");
			return;
		}
		
		for (Iterator<Animation> it = anims.iterator(); it.hasNext();){
			Animation a = it.next();
			a.getFrames().remove(match);
			if (a.getFrames().isEmpty()){
				it.remove();
			}
		}
		
	}