/** * Creates a {@code ResampleOp} that will resample input images to the * given width and height, using the given interpolation filter. * * @param width width of the re-sampled image * @param height height of the re-sampled image * @param filterType interpolation filter algorithm * @see <a href="#field_summary">filter type constants</a> */ public ResampleOp(int width, int height, int filterType) { if (width <= 0 || height <= 0) { // NOTE: w/h == 0 makes the Magick DLL crash and the JVM dies.. :-P throw new IllegalArgumentException("width and height must be positive"); } this.width = width; this.height = height; this.filterType = validateFilterType(filterType); }
/** * Creates a {@code ResampleOp} that will resample input images to the * given width and height, using the given interpolation filter. * * @param width width of the re-sampled image * @param height height of the re-sampled image * @param filterType interpolation filter algorithm * @see <a href="#field_summary">filter type constants</a> */ public ResampleOp(int width, int height, int filterType) { if (width <= 0 || height <= 0) { // NOTE: w/h == 0 makes the Magick DLL crash and the JVM dies.. :-P throw new IllegalArgumentException("width and height must be positive"); } this.width = width; this.height = height; this.filterType = validateFilterType(filterType); }
/** * Creates a {@code ResampleOp} that will resample input images to the * given width and height, using the given interpolation filter. * * @param pWidth width of the resampled image * @param pHeight height of the resampled image * @param pFilterType interpolation filter algorithm * @see <a href="#field_summary">filter type constants</a> */ public ResampleOp(int pWidth, int pHeight, int pFilterType) { if (pWidth <= 0 || pHeight <= 0) { // NOTE: w/h == 0 makes the Magick DLL crash and the JVM dies.. :-P throw new IllegalArgumentException("width and height must be positive"); } mWidth = pWidth; mHeight = pHeight; validateFilterType(pFilterType); mFilterType = pFilterType; }