Package ca.eandb.jmist.framework.color

Examples of ca.eandb.jmist.framework.color.CIEXYZ


  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Display#setPixel(int, int, ca.eandb.jmist.framework.color.Color)
   */
  public void setPixel(int x, int y, Color pixel) {
    CIEXYZ xyz = pixel.toXYZ();
    hdrImage.set(x, y, xyz);
    if (!prepareToneMapper(1)) {
      int rgb = toneMapper.apply(xyz).toRGB().toR8G8B8();
      ldrImage.setRGB(x, y, rgb);
      super.repaint(x, y, 1, 1);
View Full Code Here


    int w = pixels.getWidth();
    int h = pixels.getHeight();
    Array2<CIEXYZ> hdrTile = hdrImage.slice(x, y, w, h);
    for (int ry = 0; ry < h; ry++) {
      for (int rx = 0; rx < w; rx++) {
        CIEXYZ xyz = pixels.getPixel(rx, ry).toXYZ();
        hdrTile.set(rx, ry, xyz);
      }
    }
    if (!prepareToneMapper(hdrTile.size())) {
      BufferedImage ldrTile = ldrImage.getSubimage(x, y, w, h);
      for (int ry = 0; ry < h; ry++) {
        for (int rx = 0; rx < w; rx++) {
          CIEXYZ xyz = hdrTile.get(rx, ry);
          int rgb = toneMapper.apply(xyz).toRGB().toR8G8B8();
          ldrTile.setRGB(rx, ry, rgb);
        }
      }
      super.repaint(x, y, w, h);
View Full Code Here

   */
  public void fill(int x, int y, int w, int h, Color color) {
    for (int dy = 0; dy < h; dy++, y++) {
      int index = (y * width + x) * 3;
      for (int dx = 0; dx < w; dx++) {
        CIEXYZ c = color.toXYZ();
        array[index++] = c.X();
        array[index++] = c.Y();
        array[index++] = c.Z();
      }
    }
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Display#setPixel(int, int, ca.eandb.jmist.framework.color.Color)
   */
  public void setPixel(int x, int y, Color pixel) {
    int index = (y * width + x) * 3;
    CIEXYZ c = pixel.toXYZ();
    array[index++] = c.X();
    array[index++] = c.Y();
    array[index] = c.Z();
  }
View Full Code Here

    int h = pixels.getHeight();
    for (int ry = 0; ry < h; ry++, y++) {
      int index = (y * width + x) * 3;
      for (int rx = 0; rx < w; rx++) {
        Color pixel = pixels.getPixel(rx, ry);
        CIEXYZ c = pixel.toXYZ();
        array[index++] = c.X();
        array[index++] = c.Y();
        array[index++] = c.Z();
      }
    }
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Display#fill(int, int, int, int, ca.eandb.jmist.framework.color.Color)
   */
  @Override
  public void fill(int x, int y, int w, int h, Color color) {
    CIEXYZ xyz = color.toXYZ();
    for (int j = y; j < y + h; j++) {
      for (int i = x; i < x + w; i++) {
        picture.setPixelXYZ(i, j, xyz);
      }
    }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Display#fill(int, int, int, int, ca.eandb.jmist.framework.color.Color)
   */
  public void fill(int x, int y, int w, int h, Color color) {
    CIEXYZ xyz = color.toXYZ();
    image.slice(x, y, w, h).setAll(xyz);
  }
View Full Code Here

      ToneMapper toneMapper = toneMapperFactory.createToneMapper(image);

      for (int y = 0; y < height; y++) {
        for (int x = 0; x < width; x++) {
          CIEXYZ xyz = toneMapper.apply(image.get(x, y));
          int rgb = xyz.toRGB().toR8G8B8();
          bi.setRGB(x, y, rgb);
        }
      }

      ImageIO.write(bi, formatName, os);
View Full Code Here

    int w = pixels.getWidth();
    int h = pixels.getHeight();
    Array2<CIEXYZ> tile = image.slice(x, y, w, h);
    for (int ry = 0; ry < h; ry++) {
      for (int rx = 0; rx < w; rx++) {
        CIEXYZ xyz = pixels.getPixel(rx, ry).toXYZ();
        tile.set(rx, ry, xyz);
      }
    }
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.color.Color#toXYZ()
   */
  public CIEXYZ toXYZ() {
    return new CIEXYZ(X(), Y(), Z());
  }
View Full Code Here

TOP

Related Classes of ca.eandb.jmist.framework.color.CIEXYZ

Copyright © 2018 www.massapicom. 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.