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
不同大小的图片,有的图片会溢出,怎么计算水印的长度,再去设置位置?或者要是能实现设置右边距、下边距这样最好!
The text was updated successfully, but these errors were encountered:
同问
Sorry, something went wrong.
图片显示不全,好像是和bitmap的density有关。创建空Bitmap的默认的density是屏幕的显示密度,和水印图片的density 可能会不一致。
#53 可以看下我的这个PR,里面支持了水印文字或图片的setOrigin,可以设置对齐原点,默认是左上角,可以改为中心或右下角之类。方便进行绝对居中对齐或者右下角对齐。
适配图片大小问题:如果图片显示的大小和实际大小不一致时,比如在A4纸上两页全屏输出30004000和12001600的图片,打印出来后两个图片看起来一样大,但如果用同样的水印文本大小去绘制水印,会有一个大一个小的问题。 建议方案:自己计算图片密度,维护逻辑上的水印大小,绘制时,实际水印大小=逻辑水印大小*图片密度。 比如规定宽度1000像素对应密度是1,上面两个图片的密度分别为3和1.2,规定水印大小是20,则实际调用的时候,第一个水印大小是60,第二个是24 (注意给WatermarkBuilder的resizeBackgroundImg传false,否则内部会缩小图片。)
No branches or pull requests
不同大小的图片,有的图片会溢出,怎么计算水印的长度,再去设置位置?或者要是能实现设置右边距、下边距这样最好!
The text was updated successfully, but these errors were encountered: