@Test public void testCrop(){ final String result = QImage.createMogr(HOST) .crop(600, 600) .offset(20, 20) .quality(85) .toUrl(); final String r = HOST + "?imageMogr2/crop/!600x600a20a20/quality/85"; assertEquals(r, result); }
public QImageMogr2UrlBuilder crop(int width, int height){ if ((width < 10 || width > 16383) && width != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Width must be between 10 and 16383, inclusive."); } if ((height < 10 || height > 16383) && height != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Height must be between 10 and 16383, inclusive."); } this.width = width; this.height = height; return this; }
QImageMogr2UrlBuilder { public QImageMogr2UrlBuilder crop(int width, int height){ if ((width < 10 || width > 16383) && width != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Width must be between 10 and 16383, inclusive."); } if ((height < 10 || height > 16383) && height != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Height must be between 10 and 16383, inclusive."); } this.width = width; this.height = height; return this; } }
QImageMogr2UrlBuilder { public QImageMogr2UrlBuilder crop(int width, int height){ if ((width < 10 || width > 16383) && width != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Width must be between 10 and 16383, inclusive."); } if ((height < 10 || height > 16383) && height != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Height must be between 10 and 16383, inclusive."); } this.width = width; this.height = height; return this; } QImageMogr2UrlBuilder(String host); }
QImageMogr2UrlBuilder { public QImageMogr2UrlBuilder crop(int width, int height){ if ((width < 10 || width > 16383) && width != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Width must be between 10 and 16383, inclusive."); } if ((height < 10 || height > 16383) && height != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Height must be between 10 and 16383, inclusive."); } this.width = width; this.height = height; return this; } QImageMogr2UrlBuilder(String host); String getHost(); QImageMogr2UrlBuilder autoOrient(); QImageMogr2UrlBuilder strip(); QImageMogr2UrlBuilder scrop(); QImageMogr2UrlBuilder interlace(); QImageMogr2UrlBuilder gravity(QImage.GravityType gravityType); QImageMogr2UrlBuilder format(QImage.ImageFormat format); QImageMogr2UrlBuilder quality(int amount, boolean over); QImageMogr2UrlBuilder quality(int amount); QImageMogr2UrlBuilder rotate(int rotate); QImageMogr2UrlBuilder frameNumber(int frameNumber); QImageMogr2UrlBuilder cropWidth(int width); QImageMogr2UrlBuilder cropHeight(int height); QImageMogr2UrlBuilder crop(int width, int height); QImageMogr2UrlBuilder offsetX(int dx); QImageMogr2UrlBuilder offsetY(int dy); QImageMogr2UrlBuilder offset(int dx, int dy); QImageMogr2UrlBuilder thumbnail(int width, int height); QImageMogr2UrlBuilder thumbnailScaleeWidth(int width); QImageMogr2UrlBuilder thumbnailScaleeHeight(int height); QImageMogr2UrlBuilder thumbnailWidthe(int width); QImageMogr2UrlBuilder thumbnailHeighte(int height); QImageMogr2UrlBuilder thumbnailEdgeeMax(int width, int height); QImageMogr2UrlBuilder thumbnailEdgeeMin(int width, int height); String toUrl(); }
QImageMogr2UrlBuilder { public QImageMogr2UrlBuilder crop(int width, int height){ if ((width < 10 || width > 16383) && width != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Width must be between 10 and 16383, inclusive."); } if ((height < 10 || height > 16383) && height != QImage.ORIGINAL_SIZE){ throw new IllegalArgumentException("Height must be between 10 and 16383, inclusive."); } this.width = width; this.height = height; return this; } QImageMogr2UrlBuilder(String host); String getHost(); QImageMogr2UrlBuilder autoOrient(); QImageMogr2UrlBuilder strip(); QImageMogr2UrlBuilder scrop(); QImageMogr2UrlBuilder interlace(); QImageMogr2UrlBuilder gravity(QImage.GravityType gravityType); QImageMogr2UrlBuilder format(QImage.ImageFormat format); QImageMogr2UrlBuilder quality(int amount, boolean over); QImageMogr2UrlBuilder quality(int amount); QImageMogr2UrlBuilder rotate(int rotate); QImageMogr2UrlBuilder frameNumber(int frameNumber); QImageMogr2UrlBuilder cropWidth(int width); QImageMogr2UrlBuilder cropHeight(int height); QImageMogr2UrlBuilder crop(int width, int height); QImageMogr2UrlBuilder offsetX(int dx); QImageMogr2UrlBuilder offsetY(int dy); QImageMogr2UrlBuilder offset(int dx, int dy); QImageMogr2UrlBuilder thumbnail(int width, int height); QImageMogr2UrlBuilder thumbnailScaleeWidth(int width); QImageMogr2UrlBuilder thumbnailScaleeHeight(int height); QImageMogr2UrlBuilder thumbnailWidthe(int width); QImageMogr2UrlBuilder thumbnailHeighte(int height); QImageMogr2UrlBuilder thumbnailEdgeeMax(int width, int height); QImageMogr2UrlBuilder thumbnailEdgeeMin(int width, int height); String toUrl();  }