Package magick4j.exceptions

Examples of magick4j.exceptions.OptionException


    protected static MagickImage convolve(MagickImage image, int order, Kernel kernel)
              throws OptionException{

    if(kernel.getWidth()!=kernel.getHeight())
      throw new OptionException("Kernel must be a square matrix.");
    if(kernel.getWidth()%2 == 0)
      throw new OptionException("Kernel width must be an odd number.");

        double bias = 0.0; // Not used;
        int h = image.getHeight(), w = image.getWidth();
        MagickImage convolve = image.createCompatible();
        BufferedImage conv = image.getImageToConvolve(kernel.getWidth());
View Full Code Here

TOP

Related Classes of magick4j.exceptions.OptionException

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.