Examples of createCompatibleSampleModel()


Examples of java.awt.image.DirectColorModel.createCompatibleSampleModel()

            if(csSerialized) {
                out.writeBoolean(cm.isAlphaPremultiplied());
                // Create a SampleModel to get the transferType. This is
                // absurd but is the only apparent way to retrieve this
                // value.
                SampleModel sm = cm.createCompatibleSampleModel(1, 1);
                out.writeInt(sm.getTransferType());
            }
        } else {
            throw new RuntimeException(JaiI18N.getString("ColorModelState0"));
        }
View Full Code Here

Examples of java.awt.image.DirectColorModel.createCompatibleSampleModel()

            if(csSerialized) {
                out.writeBoolean(cm.isAlphaPremultiplied());
                // Create a SampleModel to get the transferType. This is
                // absurd but is the only apparent way to retrieve this
                // value.
                SampleModel sm = cm.createCompatibleSampleModel(1, 1);
                out.writeInt(sm.getTransferType());
            }
        } else {
            throw new RuntimeException(JaiI18N.getString("ColorModelProxy0"));
        }
View Full Code Here

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

            out.writeObject(cmap);
            out.writeBoolean(cm.hasAlpha());
            out.writeInt(cm.getTransparentPixel());
            // Create a SampleModel to get the transferType. This is
            // absurd but is the only apparent way to retrieve this value.
            SampleModel sm = cm.createCompatibleSampleModel(1, 1);
            out.writeInt(sm.getTransferType());
        } else if(colorModel instanceof DirectColorModel) {
            DirectColorModel cm = (DirectColorModel)colorModel;
            out.writeInt(COLORMODEL_DIRECT);
            boolean csSerialized =
View Full Code Here

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

            if(csSerialized) {
                out.writeBoolean(cm.isAlphaPremultiplied());
                // Create a SampleModel to get the transferType. This is
                // absurd but is the only apparent way to retrieve this
                // value.
                SampleModel sm = cm.createCompatibleSampleModel(1, 1);
                out.writeInt(sm.getTransferType());
            }
        } else {
            throw new RuntimeException(JaiI18N.getString("ColorModelState0"));
        }
View Full Code Here

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

            out.writeObject(cmap);
            out.writeBoolean(cm.hasAlpha());
            out.writeInt(cm.getTransparentPixel());
            // Create a SampleModel to get the transferType. This is
            // absurd but is the only apparent way to retrieve this value.
            SampleModel sm = cm.createCompatibleSampleModel(1, 1);
            out.writeInt(sm.getTransferType());
        } else if(colorModel instanceof DirectColorModel) {
            DirectColorModel cm = (DirectColorModel)colorModel;
            out.writeInt(COLORMODEL_DIRECT);
            boolean csSerialized =
View Full Code Here

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

            if(csSerialized) {
                out.writeBoolean(cm.isAlphaPremultiplied());
                // Create a SampleModel to get the transferType. This is
                // absurd but is the only apparent way to retrieve this
                // value.
                SampleModel sm = cm.createCompatibleSampleModel(1, 1);
                out.writeInt(sm.getTransferType());
            }
        } else {
            throw new RuntimeException(JaiI18N.getString("ColorModelProxy0"));
        }
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

                // image data are modified so if this image is mutable
                // a copy must be created.
                SampleModel sm = tile.getSampleModel();
                if(sm.getWidth() != region.width ||
                   sm.getHeight() != region.height) {
                    sm = sm.createCompatibleSampleModel(region.width,
                                                        region.height);
                }
                WritableRaster destinationRaster =
                    createWritableRaster(sm, region.getLocation());
                Raster sourceRaster =
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

                }
            } else {
                SampleModel sm = sampleModel;
                if(sm.getWidth() != region.width ||
                   sm.getHeight() != region.height) {
                    sm = sm.createCompatibleSampleModel(region.width,
                                                        region.height);
                }

                try {
                    dstRaster = createWritableRaster(sm,
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

            region = getBounds();

            SampleModel sm = getSampleModel();
            if(sm.getWidth() != region.width ||
               sm.getHeight() != region.height) {
                sm = sm.createCompatibleSampleModel(region.width,
                                                    region.height);
            }
            raster = createWritableRaster(sm, region.getLocation());
        } else {
            region = raster.getBounds().intersection(getBounds());
View Full Code Here

Examples of java.awt.image.SampleModel.createCompatibleSampleModel()

        // Create a WritableRaster of the desired size
        SampleModel destSM = getSampleModel();
        if(destSM.getWidth() != region.width ||
           destSM.getHeight() != region.height) {
            destSM = destSM.createCompatibleSampleModel(region.width,
                                                        region.height);
        }

        // Translate it
        WritableRaster dest = createWritableRaster(destSM,
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.