Java BufferedImage Create getBufferedImageType(String encodeType)

Here you can find the source of getBufferedImageType(String encodeType)

Description

get Buffered Image Type

License

Open Source License

Declaration

public static int getBufferedImageType(String encodeType) 

Method Source Code


//package com.java2s;
/*/*from  w w w . ja va  2s.  com*/
 * Copyright 2000-2013 Enonic AS
 * http://www.enonic.com/license
 */

import java.awt.image.BufferedImage;

public class Main {
    public static int getBufferedImageType(String encodeType) {
        if (encodeType.equals("png")) {
            return BufferedImage.TYPE_INT_ARGB;
        } else {
            return BufferedImage.TYPE_INT_RGB;
        }
    }
}

Related

  1. getBufferedImaged(Image img, int width, int height)
  2. getBufferedImageFrom3bytePixelArray(int[] rgb, int width, int height)
  3. getBufferedImageFromFile(String fileName)
  4. getBufferedImageFromPath(String path)
  5. getBufferedImageMixedImages(BufferedImage image1, BufferedImage image2, int xImage2, int yImage2)