Package java.awt.image

Examples of java.awt.image.BufferedImageOp.filter()


                }
               
                AffineTransform trans = AffineTransform.getRotateInstance(Math.PI/2,0,0);
                trans.translate(0,-src.getHeight());
                BufferedImageOp op = new AffineTransformOp(trans, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
                op.filter(src,dst);
                setImage(dst);
            }
        };
        action.putValue(Action.NAME,"Rotate Clockwise");
        return action;       
View Full Code Here


                    g.dispose();
                }
                AffineTransform trans = AffineTransform.getRotateInstance(-Math.PI/2,0,0);
                trans.translate(-src.getWidth(),0);
                BufferedImageOp op = new AffineTransformOp(trans, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
                op.filter(src,dst);
                setImage(dst);
            }
        };
        action.putValue(Action.NAME, "Rotate CounterClockwise");
        return action;       
View Full Code Here

            BufferedImage srcBI;
            srcBI = new BufferedImage(cm, wr, cm.isAlphaPremultiplied(), null);

            // Easy case just apply the op...
            destBI = op.filter(srcBI, null);

            if (kernelHasNegValues) {
                // When the kernel has negative values it's possible
                // for the resultant image to have alpha values less
                // than the associated color values this will lead to
View Full Code Here

            // Create the BufferedImage.
            BufferedImage tmpDstBI = new BufferedImage
                (cm, dstWR, cm.isAlphaPremultiplied(), null);

            // Filter between the two image without alpha.
            tmpDstBI = op.filter(tmpSrcBI, tmpDstBI);

            // org.apache.batik.test.gvt.ImageDisplay.showImage
            //   ("tmpDstBI: ", tmpDstBI);

            // Copy the alpha channel into the result (note the color
View Full Code Here

    float[] sharpKernel = {0.0f, -1.0f, 0.0f,
                    -1.0f, 5.0f, -1.0f,
                    0.0f, -1.0f, 0.0f};

    BufferedImageOp sharpen = new ConvolveOp( new Kernel( 3, 3, sharpKernel ), ConvolveOp.EDGE_NO_OP, null );
    BufferedImage sharp = sharpen.filter( bufferedImage, null );

    //---create an encoder object for the BufferedImage.
    JPEGEncodeParam jpegParam = JPEGCodec.getDefaultJPEGEncodeParam( sharp );
    jpegParam.setQuality( quality, false );
View Full Code Here

        // create filter to invert colors
        BufferedImageOp invertFilter = new LookupOp(
           new ByteLookupTable( 0, invertArray ), null );
       
        // apply filter to displayImage
        return invertFilter.filter( buff, null );

    }
    /**
     * A utility method to produce a gray scale {@link java.awt.image.BufferedImage}
     * @param buff
View Full Code Here

        // create filter to invert colors
        BufferedImageOp invertFilter = new LookupOp(
           new ByteLookupTable( 0, invertArray ), null );
       
        // apply filter to displayImage
        return invertFilter.filter( buff, null );

    }
    /**
     * A utility method to produce a gray scale {@link java.awt.image.BufferedImage}
     * @param buff
View Full Code Here

        // create filter to invert colors
        BufferedImageOp invertFilter = new LookupOp(
           new ByteLookupTable( 0, invertArray ), null );
       
        // apply filter to displayImage
        return invertFilter.filter( buff, null );

    }
    /**
     * A utility method to produce a gray scale {@link java.awt.image.BufferedImage}
     * @param buff
View Full Code Here

  private void updateImage(HueEntry hueEntry) {
    setImage(originalImage);
   
    if ((flags & FLAG_TRANSPARENT) != 0) {
      BufferedImageOp op = new TransparentColorFilter(Color.BLACK);
      gumpImage = op.filter((BufferedImage) getImage(), null);
    }
    if ((flags & FLAG_COLORED) != 0) {
      BufferedImageOp op = new HueColorFilter(hueEntry);
      gumpImage = op.filter((BufferedImage) getImage(), null);
    }
View Full Code Here

      BufferedImageOp op = new TransparentColorFilter(Color.BLACK);
      gumpImage = op.filter((BufferedImage) getImage(), null);
    }
    if ((flags & FLAG_COLORED) != 0) {
      BufferedImageOp op = new HueColorFilter(hueEntry);
      gumpImage = op.filter((BufferedImage) getImage(), null);
    }
  }

  /**
   * @return the isTransparent
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.