Examples of PackedColorModel


Examples of com.google.code.appengine.awt.image.PackedColorModel

            return false;
        }
        if (!(obj instanceof PackedColorModel)) {
            return false;
        }
        PackedColorModel cm = (PackedColorModel) obj;

        return (pixel_bits == cm.getPixelSize() &&
                transferType == cm.getTransferType() &&
                cs.getType() == cm.getColorSpace().getType() &&
                hasAlpha == cm.hasAlpha() &&
                isAlphaPremultiplied == cm.isAlphaPremultiplied() &&
                transparency == cm.getTransparency() &&
                numColorComponents == cm.getNumColorComponents()&&
                numComponents == cm.getNumComponents() &&
                Arrays.equals(bits, cm.getComponentSize()) &&
                Arrays.equals(componentMasks, cm.getMasks()));
    }
View Full Code Here

Examples of java.awt.image.PackedColorModel

                //
                // IndexColorModel.convertToIntDiscrete() is guaranteed
                // to return an image which has a DirectColorModel which
                // is a subclass of PackedColorModel.
                //
                PackedColorModel pcm = (PackedColorModel)bi.getColorModel();
                int bits =
                    pcm.getComponentSize(0) +
                    pcm.getComponentSize(1) +
                    pcm.getComponentSize(2);
                DirectColorModel dcm = new DirectColorModel(bits,
                                                            pcm.getMask(0),
                                                            pcm.getMask(1),
                                                            pcm.getMask(2));
                bi = new BufferedImage(dcm, rgbRas, false, null);
            }
        }

        // Create the Java2D encodeParam based on the BufferedImage
View Full Code Here

Examples of java.awt.image.PackedColorModel

    public boolean is_INT_PACK(ColorModel cm) {
          // Check ColorModel is of type DirectColorModel
        if(!(cm instanceof PackedColorModel)) return false;

        PackedColorModel pcm = (PackedColorModel)cm;

        int [] masks = pcm.getMasks();

        // Check transfer type
        if(masks.length != 4) return false;

        if (masks[0] != 0x00ff0000) return false;
View Full Code Here

Examples of java.awt.image.PackedColorModel

    public boolean is_INT_PACK(ColorModel cm) {
          // Check ColorModel is of type DirectColorModel
        if(!(cm instanceof PackedColorModel)) return false;

        PackedColorModel pcm = (PackedColorModel)cm;

        int [] masks = pcm.getMasks();

        // Check transfer type
        if(masks.length != 4) return false;

        if (masks[0] != 0x00ff0000) return false;
View Full Code Here

Examples of java.awt.image.PackedColorModel

            return BufferedImage.TYPE_INT_ARGB;
          }
        }
        if (PackedColorModel.class.isAssignableFrom(imageColorModelClass)
            && !imageColorModel.hasAlpha()) {
          PackedColorModel pcm = (PackedColorModel) imageColorModel;
          int[] masks = pcm.getMasks();
          if (masks[0] == 255) {
            return BufferedImage.TYPE_INT_BGR;
          } else {
            return BufferedImage.TYPE_INT_RGB;
          }
View Full Code Here

Examples of java.awt.image.PackedColorModel

    public boolean is_INT_PACK(ColorModel cm) {
          // Check ColorModel is of type DirectColorModel
        if(!(cm instanceof PackedColorModel)) return false;

        PackedColorModel pcm = (PackedColorModel)cm;

        int [] masks = pcm.getMasks();

        // Check transfer type
        if(masks.length != 4) return false;

        if (masks[0] != 0x00ff0000) return false;
View Full Code Here

Examples of java.awt.image.PackedColorModel

    public boolean is_INT_PACK(ColorModel cm) {
          // Check ColorModel is of type DirectColorModel
        if(!(cm instanceof PackedColorModel)) return false;

        PackedColorModel pcm = (PackedColorModel)cm;

        int [] masks = pcm.getMasks();

        // Check transfer type
        if(masks.length != 4) return false;

        if (masks[0] != 0x00ff0000) return false;
View Full Code Here

Examples of java.awt.image.PackedColorModel

    public boolean is_INT_PACK(ColorModel cm) {
          // Check ColorModel is of type DirectColorModel
        if(!(cm instanceof PackedColorModel)) return false;

        PackedColorModel pcm = (PackedColorModel)cm;

        int [] masks = pcm.getMasks();

        // Check transfer type
        if(masks.length != 4) return false;

        if (masks[0] != 0x00ff0000) return false;
View Full Code Here

Examples of java.awt.image.PackedColorModel

    public boolean is_INT_PACK(ColorModel cm) {
          // Check ColorModel is of type DirectColorModel
        if(!(cm instanceof PackedColorModel)) return false;

        PackedColorModel pcm = (PackedColorModel)cm;

        int [] masks = pcm.getMasks();

        // Check transfer type
        if(masks.length != 4) return false;

        if (masks[0] != 0x00ff0000) return false;
View Full Code Here

Examples of java.awt.image.PackedColorModel

                //
                // IndexColorModel.convertToIntDiscrete() is guaranteed
                // to return an image which has a DirectColorModel which
                // is a subclass of PackedColorModel.
                //
                PackedColorModel pcm = (PackedColorModel)bi.getColorModel();
                int bits =
                    pcm.getComponentSize(0) +
                    pcm.getComponentSize(1) +
                    pcm.getComponentSize(2);
                DirectColorModel dcm = new DirectColorModel(bits,
                                                            pcm.getMask(0),
                                                            pcm.getMask(1),
                                                            pcm.getMask(2));
                bi = new BufferedImage(dcm, rgbRas, false, null);
            }
        }

        // Create the Java2D encodeParam based on the BufferedImage
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.