Examples of createCompatibleWritableRaster()


Examples of java.awt.image.Raster.createCompatibleWritableRaster()

                        if(jpegRGBToYCbCr) {
                            WritableRaster wRas = null;
                            if(src instanceof WritableRaster) {
                                wRas = (WritableRaster)src;
                            } else {
                                wRas = src.createCompatibleWritableRaster();
                                wRas.setRect(src);
                            }

                            if (wRas.getMinX() != 0 || wRas.getMinY() != 0) {
                                wRas =
View Full Code Here

Examples of java.awt.image.Raster.createCompatibleWritableRaster()

 
  public void testRaster1(TestHarness harness)
  {
    harness.checkPoint("testRaster1()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
    Kernel k1 = new Kernel(1, 1, new float[] {1});
    ConvolveOp op = new ConvolveOp(k1, ConvolveOp.EDGE_ZERO_FILL, null);
    dest = op.filter(src, dest);
    harness.check(dest.getSample(0, 0, 0), 1);
    harness.check(dest.getSample(1, 0, 0), 2);
View Full Code Here

Examples of java.awt.image.Raster.createCompatibleWritableRaster()

   
  public void testRaster2(TestHarness harness)
  {
    harness.checkPoint("testRaster2()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
    Kernel k1 = new Kernel(3, 3, new float[] {0,0,0,
                                              0,1,0,
                                              0,0,0});
    ConvolveOp op = new ConvolveOp(k1, ConvolveOp.EDGE_ZERO_FILL, null);
    dest = op.filter(src, dest);
View Full Code Here

Examples of java.awt.image.Raster.createCompatibleWritableRaster()

 
  public void testRaster3(TestHarness harness)
  {
    harness.checkPoint("testRaster3()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
    Kernel k1 = new Kernel(3, 3, new float[] {0.1f,0.2f,0.3f,
                                              0.4f,0.5f,0.6f,
                                              0.7f,0.8f,0.9f});
    ConvolveOp op = new ConvolveOp(k1, ConvolveOp.EDGE_NO_OP, null);
    dest = op.filter(src, dest);
View Full Code Here

Examples of java.awt.image.Raster.createCompatibleWritableRaster()

 
  public void testRaster1(TestHarness harness)
  {
    harness.checkPoint("testRaster1()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
   
View Full Code Here

Examples of java.awt.image.Raster.createCompatibleWritableRaster()

   
  public void testRaster2(TestHarness harness)
  {
    harness.checkPoint("testRaster2()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
    dest = op.filter(src, dest);
View Full Code Here

Examples of java.awt.image.Raster.createCompatibleWritableRaster()

 
  public void testRaster3(TestHarness harness)
  {
    harness.checkPoint("testRaster3()");
    Raster src = createRasterA();
    WritableRaster dest = src.createCompatibleWritableRaster();
   
    byte[] bytes = new byte[] {(byte) 0xAA, (byte) 0xBB};
    ByteLookupTable t = new ByteLookupTable(0, bytes);
    LookupOp op = new LookupOp(t, null);
   
View Full Code Here

Examples of java.awt.image.Raster.createCompatibleWritableRaster()

            WritableRaster result;
            if (parentRaster instanceof WritableRaster)
            {
                if (parentColorModel.equals(colorModel))
                {
                    result = parentRaster.createCompatibleWritableRaster();
                    result.setDataElements(-parentMinX, -parentMinY, parentRaster);
                }
                else
                {
                    BufferedImage parentImage = new BufferedImage(parentColorModel,
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.