// Path: src/stub/java/com/google/appengine/api/images/Image.java
// public interface Image extends Serializable {
// 	static Image DUMMY = new Image() {
// 		private static final long serialVersionUID = 1L;
// 
// 		@Override
// 		public byte[] getImageData() {
// 			return new byte[0];
// 		}
// 	};
// 	
// 	public byte[] getImageData();
// }
// 
// Path: src/stub/java/com/google/appengine/api/images/ImagesService.java
// public interface ImagesService {
// 	static ImagesService DUMMY = new ImagesService() {
// 		@Override
// 		public Image applyTransform(Transform transform, Image image, OutputEncoding encoding) {
// 			return Image.DUMMY;
// 		}
// 	};
// 	
// 	public enum OutputEncoding {
// 		PNG,
// 		JPEG,
// 		WEBP
// 	}
// 	
// 	public Image applyTransform(Transform transform, Image image, ImagesService.OutputEncoding encoding);
// }
// 
// Path: src/stub/java/com/google/appengine/api/images/ImagesService.java
// public enum OutputEncoding {
// 	PNG,
// 	JPEG,
// 	WEBP
// }
// 
// Path: src/stub/java/com/google/appengine/api/images/ImagesServiceFactory.java
// public final class ImagesServiceFactory {
// 	public static ImagesService getImagesService() {
// 		return ImagesService.DUMMY;
// 	}
// 	
// 	public static Image makeImage(byte[] imageData) {
// 		return Image.DUMMY;
// 	}
// 	
// 	public static Transform makeVerticalFlip() {
// 		return CompositeTransform.DUMMY;
// 	}
// 	
// 	public static CompositeTransform makeCompositeTransform() {
// 		return CompositeTransform.DUMMY;
// 	}
// }
// 
// Path: src/stub/java/com/google/appengine/api/images/Transform.java
// public abstract class Transform implements java.io.Serializable {
// 	private static final long serialVersionUID = 1L;
// 
// }
// 
// Path: src/stub/java/android/graphics/Bitmap.java
// public final class Bitmap {
// 	public static enum CompressFormat {
// 		JPEG,
// 		PNG,
// 		WEBP;
// 	}
// 
// 	public void recycle() {
// 	}
// 
// 	public boolean compress(android.graphics.Bitmap.CompressFormat format, int quality, java.io.OutputStream stream) {
// 		return true;
// 	}
// }
// 
// Path: src/stub/java/android/graphics/Bitmap.java
// public static enum CompressFormat {
// 	JPEG,
// 	PNG,
// 	WEBP;
// }
// 
// Path: src/stub/java/android/graphics/BitmapFactory.java
// public class BitmapFactory {
// 	public static Bitmap decodeByteArray(byte[] data, int offset, int length) {
// 		return new Bitmap();
// 	}
// }


import java.awt.image.BufferedImage;
import java.awt.image.ColorConvertOp;
import java.awt.image.DataBuffer;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
import com.google.appengine.api.images.Image;
import com.google.appengine.api.images.ImagesService;
import com.google.appengine.api.images.ImagesService.OutputEncoding;
import com.google.appengine.api.images.ImagesServiceFactory;
import com.google.appengine.api.images.Transform;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
						for (int j = 0; j < lineSize; j++) {
							dstData.setElem(h * lineSize + j, srcData.getElem(k * lineSize + j));
						}
					}
					bufferedImage = dstImage;
				}

				ByteArrayOutputStream out = new ByteArrayOutputStream();
				ImageIO.write(bufferedImage, destType, out);
				outimage = out.toByteArray();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return outimage;
		}
	}

	private static class GAEConverter implements Converter {
		public byte[] convert(byte[] image, String destType, boolean reverse) {
			if (destType == null) {
				throw new IllegalArgumentException("dest type is null.");
			} else {
				destType = destType.toLowerCase();
			}

			ImagesService.OutputEncoding encoding = null;
			if ("png".equals(destType)) {
				encoding = OutputEncoding.PNG;
			} else if ("jpeg".equals(destType)) {
// Path: src/stub/java/com/google/appengine/api/images/Image.java
// public interface Image extends Serializable {
// 	static Image DUMMY = new Image() {
// 		private static final long serialVersionUID = 1L;
// 
// 		@Override
// 		public byte[] getImageData() {
// 			return new byte[0];
// 		}
// 	};
// 	
// 	public byte[] getImageData();
// }
// 
// Path: src/stub/java/com/google/appengine/api/images/ImagesService.java
// public interface ImagesService {
// 	static ImagesService DUMMY = new ImagesService() {
// 		@Override
// 		public Image applyTransform(Transform transform, Image image, OutputEncoding encoding) {
// 			return Image.DUMMY;
// 		}
// 	};
// 	
// 	public enum OutputEncoding {
// 		PNG,
// 		JPEG,
// 		WEBP
// 	}
// 	
// 	public Image applyTransform(Transform transform, Image image, ImagesService.OutputEncoding encoding);
// }
// 
// Path: src/stub/java/com/google/appengine/api/images/ImagesService.java
// public enum OutputEncoding {
// 	PNG,
// 	JPEG,
// 	WEBP
// }
// 
// Path: src/stub/java/com/google/appengine/api/images/ImagesServiceFactory.java
// public final class ImagesServiceFactory {
// 	public static ImagesService getImagesService() {
// 		return ImagesService.DUMMY;
// 	}
// 	
// 	public static Image makeImage(byte[] imageData) {
// 		return Image.DUMMY;
// 	}
// 	
// 	public static Transform makeVerticalFlip() {
// 		return CompositeTransform.DUMMY;
// 	}
// 	
// 	public static CompositeTransform makeCompositeTransform() {
// 		return CompositeTransform.DUMMY;
// 	}
// }
// 
// Path: src/stub/java/com/google/appengine/api/images/Transform.java
// public abstract class Transform implements java.io.Serializable {
// 	private static final long serialVersionUID = 1L;
// 
// }
// 
// Path: src/stub/java/android/graphics/Bitmap.java
// public final class Bitmap {
// 	public static enum CompressFormat {
// 		JPEG,
// 		PNG,
// 		WEBP;
// 	}
// 
// 	public void recycle() {
// 	}
// 
// 	public boolean compress(android.graphics.Bitmap.CompressFormat format, int quality, java.io.OutputStream stream) {
// 		return true;
// 	}
// }
// 
// Path: src/stub/java/android/graphics/Bitmap.java
// public static enum CompressFormat {
// 	JPEG,
// 	PNG,
// 	WEBP;
// }
// 
// Path: src/stub/java/android/graphics/BitmapFactory.java
// public class BitmapFactory {
// 	public static Bitmap decodeByteArray(byte[] data, int offset, int length) {
// 		return new Bitmap();
// 	}
// }


// Path: src/main/java/net/arnx/wmf2svg/util/ImageUtil.java
import java.awt.image.BufferedImage;
import java.awt.image.ColorConvertOp;
import java.awt.image.DataBuffer;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import javax.imageio.ImageIO;
import com.google.appengine.api.images.Image;
import com.google.appengine.api.images.ImagesService;
import com.google.appengine.api.images.ImagesService.OutputEncoding;
import com.google.appengine.api.images.ImagesServiceFactory;
import com.google.appengine.api.images.Transform;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;

						for (int j = 0; j < lineSize; j++) {
							dstData.setElem(h * lineSize + j, srcData.getElem(k * lineSize + j));
						}
					}
					bufferedImage = dstImage;
				}

				ByteArrayOutputStream out = new ByteArrayOutputStream();
				ImageIO.write(bufferedImage, destType, out);
				outimage = out.toByteArray();
			} catch (IOException e) {
				e.printStackTrace();
			}

			return outimage;
		}
	}

	private static class GAEConverter implements Converter {
		public byte[] convert(byte[] image, String destType, boolean reverse) {
			if (destType == null) {
				throw new IllegalArgumentException("dest type is null.");
			} else {
				destType = destType.toLowerCase();
			}

			ImagesService.OutputEncoding encoding = null;
			if ("png".equals(destType)) {
				encoding = OutputEncoding.PNG;
			} else if ("jpeg".equals(destType)) {
				encoding = OutputEncoding.JPEG;