/** * Creates a scaled instance of the given {@code BufferedImage}. * * @param pImage the {@code BufferedImage} to scale * @param pWidth width in pixels * @param pHeight height in pixels * @param pHints scaling mHints * * @return a {@code BufferedImage} * * @throws NullPointerException if {@code pImage} is {@code null}. * * @see Image#SCALE_AREA_AVERAGING * @see Image#SCALE_DEFAULT * @see Image#SCALE_FAST * @see Image#SCALE_REPLICATE * @see Image#SCALE_SMOOTH * @see ResampleOp */ public static BufferedImage createResampled(BufferedImage pImage, int pWidth, int pHeight, int pHints) { // Hints are converted between java.awt.Image hints and filter types return new ResampleOp(pWidth, pHeight, convertAWTHints(pHints)).filter(pImage, null); }
/** * Creates a scaled instance of the given {@code BufferedImage}. * * @param pImage the {@code BufferedImage} to scale * @param pWidth width in pixels * @param pHeight height in pixels * @param pHints scaling mHints * * @return a {@code BufferedImage} * * @throws NullPointerException if {@code pImage} is {@code null}. * * @see Image#SCALE_AREA_AVERAGING * @see Image#SCALE_DEFAULT * @see Image#SCALE_FAST * @see Image#SCALE_REPLICATE * @see Image#SCALE_SMOOTH * @see ResampleOp */ public static BufferedImage createResampled(BufferedImage pImage, int pWidth, int pHeight, int pHints) { // Hints are converted between java.awt.Image hints and filter types return new ResampleOp(pWidth, pHeight, convertAWTHints(pHints)).filter(pImage, null); }
/** * Creates a scaled instance of the given {@code BufferedImage}. * * @param pImage the {@code BufferedImage} to scale * @param pWidth width in pixels * @param pHeight height in pixels * @param pHints scaling mHints * * @return a {@code BufferedImage} * * @throws NullPointerException if {@code pImage} is {@code null}. * * @see Image#SCALE_AREA_AVERAGING * @see Image#SCALE_DEFAULT * @see Image#SCALE_FAST * @see Image#SCALE_REPLICATE * @see Image#SCALE_SMOOTH * @see ResampleOp */ public static BufferedImage createResampled(BufferedImage pImage, int pWidth, int pHeight, int pHints) { // Hints are converted between java.awt.Image hints and filter types return new ResampleOp(pWidth, pHeight, convertAWTHints(pHints)).filter(pImage, null); }