| java.lang.Object net.myvietnam.mvncore.util.ImageUtil
ImageUtil | final public class ImageUtil (Code) | | |
Method Summary | |
public static void | createThumbnail(InputStream inputStream, String thumbnailFile, int maxWidth, int maxHeight) | public static void | createThumbnail(InputStream inputStream, OutputStream outputStream, int maxWidth, int maxHeight) | public static Image | getFitSizeImage(Image srcImage, int fitWidth, int fitHeight) | public static Image | getFitSizeImage(InputStream inputStream, int fitWidth, int fitHeight) | public static BufferedImage | getProductionImage(String productVersion, String productRealeaseDate) | public static Image | getScaledInstance(Image srcImage, int width, int height) | public static void | writeJpegImage_Sun(Image image, OutputStream outputStream) This method write the image to a stream. | public static void | writeJpegImage_Sun(Image image, String fileName) | public static void | writeJpegImage_nonSun(Image image, OutputStream outputStream) | public static void | writeJpegImage_nonSun(Image image, String fileName) |
createThumbnail | public static void createThumbnail(InputStream inputStream, String thumbnailFile, int maxWidth, int maxHeight) throws IOException(Code) | | Parameters: inputStream - the stream of a jpeg file Parameters: thumbnailFile - the output file, must have the ".jpg" extension Parameters: maxWidth - the maximum width of the image Parameters: maxHeight - the maximum height of the image throws: IOException - throws: BadInputException - |
createThumbnail | public static void createThumbnail(InputStream inputStream, OutputStream outputStream, int maxWidth, int maxHeight) throws IOException(Code) | | Parameters: inputStream - the stream of a jpeg file Parameters: outputStream - the output stream Parameters: maxWidth - the maximum width of the image Parameters: maxHeight - the maximum height of the image throws: IOException - throws: BadInputException - |
getFitSizeImage | public static Image getFitSizeImage(Image srcImage, int fitWidth, int fitHeight) throws IOException(Code) | | This method returns a fit-sized image for a source image,
this method retains the ratio of the source image
|
getFitSizeImage | public static Image getFitSizeImage(InputStream inputStream, int fitWidth, int fitHeight) throws IOException(Code) | | This method returns a fit-sized image for a source image,
this method retains the ratio of the source image
|
getScaledInstance | public static Image getScaledInstance(Image srcImage, int width, int height)(Code) | | |
writeJpegImage_Sun | public static void writeJpegImage_Sun(Image image, OutputStream outputStream) throws IOException(Code) | | This method write the image to a stream.
It auto detect the image is Image or BufferedImage.
This method close the output stream before it return.
Parameters: image - Image Parameters: outputStream - OutputStream throws: IOException - |
writeJpegImage_nonSun | public static void writeJpegImage_nonSun(Image image, OutputStream outputStream) throws IOException(Code) | | This method write image to output stream, then it close the stream before return
Parameters: image - Image Parameters: outputStream - OutputStream throws: IOException - |
|
|