public void readBdn(File inFile, File outFile) {
		boolean pngToBmp = true;
		long lasting = System.currentTimeMillis();
		File inParentDirectory = inFile.getParentFile();
		File outParentDirectory = outFile.getParentFile();

		if (!inParentDirectory.isDirectory()) {
			System.out.println("inParentDirectory: " + inParentDirectory.toString() + " is not directory.");
			return;
		}
		if (!outParentDirectory.isDirectory()) {
			System.out.println("outParentDirectory: " + outParentDirectory.toString() + " is not directory.");
			return;
		}

		try {
			Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile), "UTF8"));

			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
			DocumentBuilder builder = factory.newDocumentBuilder();
			Document doc = builder.parse(inFile);

			NodeList formatNl = doc.getElementsByTagName("Format");
			Element formatElement = (Element) formatNl.item(0);
			Float frameRate = Float.parseFloat(formatElement.getAttribute("FrameRate"));
			NodeList eventNl = doc.getElementsByTagName("Event");

			int total = eventNl.getLength();
			listener.changeStatus("Total length: " + total);
			for (int i = 0; i < total; i++) {
				Node eventNode = eventNl.item(i);
				Element eventElement = (Element) eventNode;
				NodeList graphNodes = eventNode.getChildNodes();
				String startTime = eventElement.getAttribute("InTC");
				String endTime = eventElement.getAttribute("OutTC");
				startTime = BdnToSrtConverter.BDNTimeToSrtTime(startTime, frameRate);
				endTime = BdnToSrtConverter.BDNTimeToSrtTime(endTime, frameRate);

				listener.changeStatus("Converting: " + (i+1) + "/" + total);

				out.append(String.format("%d", (i + 1))).append("\r\n");
				out.append(startTime);
				out.append(" --> ");
				out.append(endTime).append("\r\n");

				for (int j = 0; j < graphNodes.getLength(); j++) {
					String nodeName = graphNodes.item(j).getNodeName();
					if (!nodeName.equals("Graphic")) {
						continue;
					}
					Element graphNode = (Element) graphNodes.item(j);
					String text = graphNode.getTextContent();
					if (pngToBmp) {
						String inPngFilePath = inParentDirectory.toString() + "/" + text;
						text = String.format("%04d.bmp", (i + 1));
						String outBmpFilePath = outParentDirectory.toString() + "/" + text;

						// convert file and save to destination
						BdnToSrtConverter.pngToBmp(new File(inPngFilePath), new File(outBmpFilePath));
					}
					out.append(text).append("\r\n");
				}
				out.append("\r\n");
				out.flush();
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}