Java BufferedImage Operation indexToDirectColorModel(BufferedImage image)

Here you can find the source of indexToDirectColorModel(BufferedImage image)

Description

index To Direct Color Model

License

Apache License

Declaration

public static BufferedImage indexToDirectColorModel(BufferedImage image) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.*;
import java.awt.image.*;

public class Main {
    public static BufferedImage indexToDirectColorModel(BufferedImage image) {
        BufferedImage result = new BufferedImage(image.getWidth(),
                image.getHeight(), BufferedImage.TYPE_BYTE_BINARY);

        Graphics2D g2 = result.createGraphics();
        g2.drawImage(image, null, null);
        return result;
    }/*from w  ww .j  a v  a2  s  . c om*/
}

Related

  1. height(BufferedImage image, Double measurementLatitude, Double measurementLongitude)
  2. highlight(BufferedImage img, Color source, Color dest)
  3. hitTest(BufferedImage image, int x, int y)
  4. hueShift(BufferedImage image, int hue)
  5. inColormap(float[][] in, float min, float max, float[][] colormap, BufferedImage b)
  6. intBuffer2BufferedImage(IntBuffer ib, BufferedImage img)
  7. intensityArrayToBufferedImage(byte[] array, int w, int h)
  8. interp(BufferedImage img1, BufferedImage img2, int weight1, int weight2)
  9. knit(BufferedImage[] buffImages)