Java Utililty Methods BufferedImage Thumbnail

List of utility methods to do BufferedImage Thumbnail

Description

The list of methods to do BufferedImage Thumbnail are organized into topic(s).

Method

voidthumbnail(File input, File output, int sizeX, int sizeY)
Create a file containing a thumbnail image from another file.
if (debugLevel > 2) {
    System.out.println("Arguments: " + input.getCanonicalPath() + ", " + output.getCanonicalPath() + ", "
            + Integer.toString(sizeX) + ", " + Integer.toString(sizeY));
Integer targetX = 0;
Integer targetY = 0;
if (sizeX <= 0 && sizeY <= 0) {
    throw new IOException("Either target width or target height must be positive");
...
voidthumbnail(final InputStream inputStream, final int width, final int height, final OutputStream outputStream)
thumbnail
thumbnail(inputStream, width, height, false, outputStream);
booleanthumbnail(int imageWidth, int imageHeight, File originFileName, File thumbFileName)
thumbnail
boolean result = false;
try {
    BufferedImage bufferOriginImg = ImageIO.read(originFileName);
    BufferedImage bufferThumbImg = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_3BYTE_BGR);
    Graphics2D graphic = bufferThumbImg.createGraphics();
    graphic.drawImage(bufferOriginImg, 0, 0, imageWidth, imageHeight, null);
    ImageIO.write(bufferThumbImg, "jpg", thumbFileName);
    result = true;
...