We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
求透明背景png文件缩放后还是透明背景
PS:既然有了图片处理类,能否增加图片水印、文字水印的方法,可以设定水印图是否等比缩放,以及水印出现的位置,如左上、右下、中下、中间等。谢~
The text was updated successfully, but these errors were encountered:
用public static BufferedImage zoomScale(BufferedImage im, int w, int h)这个方法不会添加背景色
public static BufferedImage zoomScale(BufferedImage im, int w, int h)
添加图片文字水印自己封装一下不就好了
Sorry, something went wrong.
@ywjno 试过了,zoomScale(BufferedImage im, int w, int h) 是黑色的背景。
自己写了个。。。
BufferedImage nimage = new BufferedImage(nw, nh, BufferedImage.TYPE_INT_RGB); Graphics2D gc = nimage.createGraphics(); nimage = gc.getDeviceConfiguration().createCompatibleImage(nw, nh, Transparency.TRANSLUCENT); gc.dispose(); gc = nimage.createGraphics(); gc.fillRect(0, 0, w, h); gc.setComposite(AlphaComposite.Src); gc.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); gc.drawImage(markImage, 0, 0, nw, nh, null, null); gc.dispose();
fixed issue #662
f1c06a9
wendal
No branches or pull requests
求透明背景png文件缩放后还是透明背景
PS:既然有了图片处理类,能否增加图片水印、文字水印的方法,可以设定水印图是否等比缩放,以及水印出现的位置,如左上、右下、中下、中间等。谢~
The text was updated successfully, but these errors were encountered: