Examples of convertToIntDiscrete()


Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

            //
            // Need to expand the indexed data to components.
            // The convertToIntDiscrete method is used to perform this.
            //
            IndexColorModel icm = (IndexColorModel)colorModel;
            bi = icm.convertToIntDiscrete(bi.getRaster(), false);

            if(bi.getSampleModel().getNumBands() == 4) {
                //
                // Without copying data create a BufferedImage which has
                // only the RGB bands, not the alpha band.
View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

      return null;
    }
    ColorModel colorModel = img.getColorModel();
    if (colorModel instanceof IndexColorModel) {
      IndexColorModel indexModel = (IndexColorModel)colorModel;
      return indexModel.convertToIntDiscrete(img.getData(), false);
    }
    return null;
  }

View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

            //
            // Need to expand the indexed data to components.
            // The convertToIntDiscrete method is used to perform this.
            //
            IndexColorModel icm = (IndexColorModel)colorModel;
            bi = icm.convertToIntDiscrete(bi.getRaster(), false);

            if(bi.getSampleModel().getNumBands() == 4) {
                //
                // Without copying data create a BufferedImage which has
                // only the RGB bands, not the alpha band.
View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

        ColorModel dstCM;
        BufferedImage origDst = dst;
       
        if (srcCM instanceof IndexColorModel) {
            IndexColorModel icm = (IndexColorModel) srcCM;
            src = icm.convertToIntDiscrete(src.getRaster(), false);
            srcCM = src.getColorModel();
        }
       
        if (dst == null) {
            dst = createCompatibleDestImage(src, null);
View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

        ColorModel dstCM;
        BufferedImage origDst = dst;
       
        if (srcCM instanceof IndexColorModel) {
            IndexColorModel icm = (IndexColorModel) srcCM;
            src = icm.convertToIntDiscrete(src.getRaster(), false);
            srcCM = src.getColorModel();
        }
       
        if (dst == null) {
            dst = createCompatibleDestImage(src, null);
View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

        ColorModel dstCM;
        BufferedImage origDst = dst;
       
        if (srcCM instanceof IndexColorModel) {
            IndexColorModel icm = (IndexColorModel) srcCM;
            src = icm.convertToIntDiscrete(src.getRaster(), false);
            srcCM = src.getColorModel();
        }
       
        if (dst == null) {
            dst = createCompatibleDestImage(src, null);
View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

        ColorModel dstCM;
        BufferedImage origDst = dst;
       
        if (srcCM instanceof IndexColorModel) {
            IndexColorModel icm = (IndexColorModel) srcCM;
            src = icm.convertToIntDiscrete(src.getRaster(), false);
            srcCM = src.getColorModel();
        }
        if (dst == null) {
            dst = createCompatibleDestImage(src, null);
            dstCM = srcCM;
View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

        ColorModel dstCM;
        BufferedImage origDst = dst;
       
        if (srcCM instanceof IndexColorModel) {
            IndexColorModel icm = (IndexColorModel) srcCM;
            src = icm.convertToIntDiscrete(src.getRaster(), false);
            srcCM = src.getColorModel();
        }
       
        int neww;
        int newh;
View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

        ColorModel dstCM;
        BufferedImage origDst = dst;
       
        if (srcCM instanceof IndexColorModel) {
            IndexColorModel icm = (IndexColorModel) srcCM;
            src = icm.convertToIntDiscrete(src.getRaster(), false);
            srcCM = src.getColorModel();
        }
       
        if (dst == null) {
            dst = createCompatibleDestImage(src, null);
View Full Code Here

Examples of java.awt.image.IndexColorModel.convertToIntDiscrete()

/* 187 */     com.sun.image.codec.jpeg.JPEGEncodeParam j2dEP = null;
/*     */     BufferedImage bi;
/* 188 */     if ((colorModel instanceof IndexColorModel))
/*     */     {
/* 193 */       IndexColorModel icm = (IndexColorModel)colorModel;
/* 194 */       BufferedImage bi = icm.convertToIntDiscrete(wRas, false);
/* 195 */       j2dEP = JPEGCodec.getDefaultJPEGEncodeParam(bi);
/*     */     } else {
/* 197 */       bi = new BufferedImage(colorModel, wRas, false, null);
/* 198 */       j2dEP = JPEGCodec.getDefaultJPEGEncodeParam(bi);
/*     */     }
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.