package com.egantt.awt.image; import java.awt.image.BufferedImage; /** * */ public interface ImageEncoder { /** * Returns the MimeType generated by the encoder */ String getType(); // __________________________________________________________________________ /** * Encodes the image and returns the byte array, returns an empty array on finish * the java.awt.Image interface does not provide enough information to the encoder * therefore we pass a BufferedImage and use a subset of it's functionality */ byte[] encode(BufferedImage image); }