public ThumborUrlBuilder resize ( int width , int height ) { if ( width < 0 && width != ORIGINAL_SIZE ) { throw new IllegalArgumentException ( "Width must be a positive number." ) ; } if ( height < 0 && height != ORIGINAL_SIZE ) { throw new IllegalArgumentException ( "Height must be a positive number." ) ; } if ( width == 0 && height == 0 ) { throw new IllegalArgumentException ( "Both width and height must not be zero." ) ; } hasResize = true ; resizeWidth = width ; resizeHeight = height ; return this ; }
Resize picture to desired size .