Package java.awt.image

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


        if (tw > defSz) tw = defSz;
        int th = bounds.height;
        if (th > defSz) th = defSz;

        // fix my sample model so it makes sense given my size.
        SampleModel sm = cm.createCompatibleSampleModel(tw, th);

        // Finish initializing our base class...
        init((CachableRed)null, bounds, cm, sm, 0, 0, null);

        raster = Raster.createWritableRaster(sm, new Point(0, 0));
View Full Code Here


        int tw = litRegion.width;
        int th = litRegion.height;
        int defSz = AbstractTiledRed.getDefaultTileSize();
        if (tw > defSz) tw = defSz;
        if (th > defSz) th = defSz;
        SampleModel sm = cm.createCompatibleSampleModel(tw, th);
                                            
        init((CachableRed)null, litRegion, cm, sm,
             litRegion.x, litRegion.y, null);
    }
View Full Code Here

            else
                cm = GraphicsUtil.sRGB_Unpre;
        }

        SampleModel sm =
            cm.createCompatibleSampleModel(src.getWidth(),
                                           src.getHeight());

        init(src, src.getBounds(), cm, sm,
             src.getTileGridXOffset(), src.getTileGridYOffset(), null);
    }
View Full Code Here

        SampleModel sm = src.getSampleModel();
        int tw = sm.getWidth();
        int th = sm.getHeight();
        if (tw > myBounds.widthtw = myBounds.width;
        if (th > myBounds.height) th = myBounds.height;
        sm = cm.createCompatibleSampleModel(tw, th);

        init(src, myBounds, cm, sm,
             src.getTileGridXOffset()+xinset,
             src.getTileGridYOffset()+yinset, null);
View Full Code Here

            tw = 1;
            th = 1;
        }

        // fix my sample model so it makes sense given my size.
        SampleModel sm = cm.createCompatibleSampleModel(tw, th);

        // Finish initializing our base class...
        init((CachableRed)null, bounds, cm, sm, tgX, tgY, null);
    }
View Full Code Here

                    final int alphaMask, final int transferType,
                    final boolean isAlphaPremultiplied) {
        final ColorModel model = new DirectColorModel(colorSpace, 32, redMask,
                        greenMask, blueMask, alphaMask, isAlphaPremultiplied,
                        transferType);
        return new ImageTypeSpecifier(model, model.createCompatibleSampleModel(
            1, 1));
    }

    public static ImageTypeSpecifier createInterleaved(ColorSpace colorSpace,
                                                       int[] bandOffsets,
View Full Code Here

      }
    }

    ColorModel cModel = ColorModel.getRGBdefault();
    DataBufferInt intBuf = new DataBufferInt(data, (width * height));
    SampleModel sModel = cModel.createCompatibleSampleModel(width, height);

    // create our raster
    WritableRaster raster = Raster.createWritableRaster(sModel, intBuf,
        null);

View Full Code Here

        // pick a color model, based on the number of components and
        // bits per component
        cm = getColorModel();

        // create a compatible raster
        SampleModel sm = cm
            .createCompatibleSampleModel(getWidth(), getHeight());
        WritableRaster raster;
        try {
          raster = Raster.createWritableRaster(sm, db, new Point(0, 0));
        } catch (RasterFormatException e) {
View Full Code Here

            tw = 1;
            th = 1;
        }

        // fix my sample model so it makes sense given my size.
        SampleModel sm = cm.createCompatibleSampleModel(tw, th);

        // Finish initializing our base class...
        init((CachableRed)null, bounds, cm, sm, tgX, tgY, null);
    }
View Full Code Here

        this.scaleY = scaleY;

        ColorModel cm = GraphicsUtil.Linear_sRGB_Unpre;

        SampleModel sm =
            cm.createCompatibleSampleModel(litRegion.width,
                                           litRegion.height);
                                            
        init((CachableRed)null, litRegion, cm, sm,
             litRegion.x, litRegion.y, null);
    }
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.