Package java.awt.image

Examples of java.awt.image.BufferedImage.coerceData()


    double size = bytes.length / 4.0;
    if (size - Math.floor(size) > 0)
      size++;

    BufferedImage bi = new BufferedImage((int) size, 1, BufferedImage.TYPE_INT_ARGB);
    bi.coerceData(false);
    int pos = 0;
    for (int i = 0; i < bytes.length; i += 4) {
      int r = bytes[i];
      int g = i + 1 < bytes.length ? bytes[i + 1] : 0;
      int b = i + 2 < bytes.length ? bytes[i + 2] : 0;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.