Package ar.com.hjg.pngj

Examples of ar.com.hjg.pngj.ImageLineByte


      /* get raw data of image */
      DataBuffer imageDataBuffer = img.getRaster().getDataBuffer();
      int[] data = (((DataBufferInt)imageDataBuffer).getData());
     
      /* create one ImageLine that will be refilled and written to png */
      ImageLineByte bline = new ImageLineByte(imgInfo);
      byte[] line = bline.getScanline();
     
      for (int i = 0; i < lines; i++) {
        for (int d = 0; d < img.getWidth(); d++) {
          int val = data[i*img.getWidth()+d];
          line[3*d+0] = (byte) (val >> 16);
View Full Code Here


  }

  public static IImageLineFactory<ImageLineByte> getFactory(ImageInfo iminfo) {
    return new IImageLineFactory<ImageLineByte>() {
      public ImageLineByte createImageLine(ImageInfo iminfo) {
        return new ImageLineByte(iminfo);
      }
    };
  }
View Full Code Here

  }

  public static IImageLineFactory<ImageLineByte> getFactory(ImageInfo iminfo) {
    return new IImageLineFactory<ImageLineByte>() {
      public ImageLineByte createImageLine(ImageInfo iminfo) {
        return new ImageLineByte(iminfo);
      }
    };
  }
View Full Code Here

TOP

Related Classes of ar.com.hjg.pngj.ImageLineByte

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.