Package java.awt.image

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


    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

    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

            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

    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

    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

    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

    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

                //
                // 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

    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

TOP

Related Classes of java.awt.image.PackedColorModel

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.