// Path: main/java/Vexillo/src/com/kreative/vexillo/core/ASCII85OutputStream.java
// public class ASCII85OutputStream extends OutputStream {
// 	private final StringBuffer sb;
// 	private final OutputStream out;
// 	private final boolean xml, x, y, z;
// 	
// 	public ASCII85OutputStream(StringBuffer sb) {
// 		this(sb, false, false, false, true);
// 	}
// 	
// 	public ASCII85OutputStream(OutputStream out) {
// 		this(out, false, false, false, true);
// 	}
// 	
// 	public ASCII85OutputStream(StringBuffer sb, boolean xml, boolean x, boolean y, boolean z) {
// 		this.sb = sb;
// 		this.out = null;
// 		this.xml = xml;
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 	}
// 	
// 	public ASCII85OutputStream(OutputStream out, boolean xml, boolean x, boolean y, boolean z) {
// 		this.sb = null;
// 		this.out = out;
// 		this.xml = xml;
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 	}
// 	
// 	private long word = 0;
// 	private int count = 0;
// 	
// 	@Override
// 	public void write(int b) throws IOException {
// 		if (count < 0) {
// 			if (sb != null) sb.append('~');
// 			if (out != null) out.write('~');
// 			word = 0;
// 			count = 0;
// 		}
// 		word <<= 8;
// 		word |= (b & 0xFF);
// 		count++;
// 		if (count >= 4) {
// 			if (word == 0x00000000L && z) {
// 				if (sb != null) sb.append('z');
// 				if (out != null) out.write('z');
// 			} else if (word == 0x20202020L && y) {
// 				if (sb != null) sb.append('y');
// 				if (out != null) out.write('y');
// 			} else if (word == 0xFFFFFFFFL && x) {
// 				if (sb != null) sb.append('x');
// 				if (out != null) out.write('x');
// 			} else {
// 				writeWord();
// 			}
// 			word = 0;
// 			count = 0;
// 		}
// 	}
// 	
// 	@Override
// 	public void flush() throws IOException {
// 		if (out != null) out.flush();
// 	}
// 	
// 	@Override
// 	public void close() throws IOException {
// 		if (count > 0) {
// 			for (int i = count; i < 4; i++) word <<= 8;
// 			writeWord();
// 		}
// 		word = -1;
// 		count = -1;
// 		if (out != null) out.close();
// 	}
// 	
// 	private void writeWord() throws IOException {
// 		for (int d = 52200625, i = 0; i <= count; d /= 85, i++) {
// 			char c = (char)('!' + ((word / d) % 85));
// 			if (xml) {
// 				switch (c) {
// 					case '&': c = '|'; break;
// 					case '<': c = '{'; break;
// 					case '>': c = '}'; break;
// 					case '\'': c = 'v'; break;
// 					case '\"': c = 'w'; break;
// 				}
// 			}
// 			if (sb != null) sb.append(c);
// 			if (out != null) out.write(c);
// 		}
// 	}
// }


import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Scanner;
import com.kreative.vexillo.core.ASCII85OutputStream;
			}
		}
		if (anyWritten) System.out.println("\t\t</imgdef>");
	}
	
	private static boolean writeRaw(String imageId, boolean anyWritten, File file, String type) throws IOException {
		boolean thisWritten = false;
		Scanner scan = new Scanner(file);
		while (scan.hasNextLine()) {
			String line = scan.nextLine();
			if (line.trim().length() == 0) continue;
			if (!anyWritten) System.out.println("\t\t<imgdef id=\"" + xmlEscape(imageId) + "\">");
			if (!thisWritten) {
				System.out.println("\t\t\t<imgsrc type=\"" + xmlEscape(type) + "\" enc=\"raw\">");
				System.out.println("\t\t\t\t<![CDATA[");
			}
			System.out.println("\t\t\t\t\t" + line);
			thisWritten = true;
			anyWritten = true;
		}
		scan.close();
		if (thisWritten) {
			System.out.println("\t\t\t\t]]>");
			System.out.println("\t\t\t</imgsrc>");
		}
		return anyWritten;
	}
	
	private static boolean writeASCII85(String imageId, boolean anyWritten, File file, String type) throws IOException {
		ByteArrayOutputStream bs = new ByteArrayOutputStream();
// Path: main/java/Vexillo/src/com/kreative/vexillo/core/ASCII85OutputStream.java
// public class ASCII85OutputStream extends OutputStream {
// 	private final StringBuffer sb;
// 	private final OutputStream out;
// 	private final boolean xml, x, y, z;
// 	
// 	public ASCII85OutputStream(StringBuffer sb) {
// 		this(sb, false, false, false, true);
// 	}
// 	
// 	public ASCII85OutputStream(OutputStream out) {
// 		this(out, false, false, false, true);
// 	}
// 	
// 	public ASCII85OutputStream(StringBuffer sb, boolean xml, boolean x, boolean y, boolean z) {
// 		this.sb = sb;
// 		this.out = null;
// 		this.xml = xml;
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 	}
// 	
// 	public ASCII85OutputStream(OutputStream out, boolean xml, boolean x, boolean y, boolean z) {
// 		this.sb = null;
// 		this.out = out;
// 		this.xml = xml;
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 	}
// 	
// 	private long word = 0;
// 	private int count = 0;
// 	
// 	@Override
// 	public void write(int b) throws IOException {
// 		if (count < 0) {
// 			if (sb != null) sb.append('~');
// 			if (out != null) out.write('~');
// 			word = 0;
// 			count = 0;
// 		}
// 		word <<= 8;
// 		word |= (b & 0xFF);
// 		count++;
// 		if (count >= 4) {
// 			if (word == 0x00000000L && z) {
// 				if (sb != null) sb.append('z');
// 				if (out != null) out.write('z');
// 			} else if (word == 0x20202020L && y) {
// 				if (sb != null) sb.append('y');
// 				if (out != null) out.write('y');
// 			} else if (word == 0xFFFFFFFFL && x) {
// 				if (sb != null) sb.append('x');
// 				if (out != null) out.write('x');
// 			} else {
// 				writeWord();
// 			}
// 			word = 0;
// 			count = 0;
// 		}
// 	}
// 	
// 	@Override
// 	public void flush() throws IOException {
// 		if (out != null) out.flush();
// 	}
// 	
// 	@Override
// 	public void close() throws IOException {
// 		if (count > 0) {
// 			for (int i = count; i < 4; i++) word <<= 8;
// 			writeWord();
// 		}
// 		word = -1;
// 		count = -1;
// 		if (out != null) out.close();
// 	}
// 	
// 	private void writeWord() throws IOException {
// 		for (int d = 52200625, i = 0; i <= count; d /= 85, i++) {
// 			char c = (char)('!' + ((word / d) % 85));
// 			if (xml) {
// 				switch (c) {
// 					case '&': c = '|'; break;
// 					case '<': c = '{'; break;
// 					case '>': c = '}'; break;
// 					case '\'': c = 'v'; break;
// 					case '\"': c = 'w'; break;
// 				}
// 			}
// 			if (sb != null) sb.append(c);
// 			if (out != null) out.write(c);
// 		}
// 	}
// }


// Path: main/java/Vexillo/src/com/kreative/vexillo/main/DefineImage.java
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Scanner;
import com.kreative.vexillo.core.ASCII85OutputStream;

			}
		}
		if (anyWritten) System.out.println("\t\t</imgdef>");
	}
	
	private static boolean writeRaw(String imageId, boolean anyWritten, File file, String type) throws IOException {
		boolean thisWritten = false;
		Scanner scan = new Scanner(file);
		while (scan.hasNextLine()) {
			String line = scan.nextLine();
			if (line.trim().length() == 0) continue;
			if (!anyWritten) System.out.println("\t\t<imgdef id=\"" + xmlEscape(imageId) + "\">");
			if (!thisWritten) {
				System.out.println("\t\t\t<imgsrc type=\"" + xmlEscape(type) + "\" enc=\"raw\">");
				System.out.println("\t\t\t\t<![CDATA[");
			}
			System.out.println("\t\t\t\t\t" + line);
			thisWritten = true;
			anyWritten = true;
		}
		scan.close();
		if (thisWritten) {
			System.out.println("\t\t\t\t]]>");
			System.out.println("\t\t\t</imgsrc>");
		}
		return anyWritten;
	}
	
	private static boolean writeASCII85(String imageId, boolean anyWritten, File file, String type) throws IOException {
		ByteArrayOutputStream bs = new ByteArrayOutputStream();
		ASCII85OutputStream as = new ASCII85OutputStream(bs, false, false, false, true);