Uses of Class
org.miaixz.bus.extra.image.Images
Packages that use Images
-
Uses of Images in org.miaixz.bus.extra.image
Methods in org.miaixz.bus.extra.image that return ImagesModifier and TypeMethodDescriptionImages.binary()彩色转为黑白二值化图片Images.cut(int x, int y) 图像切割为圆形(按指定起点坐标和半径切割),填充满整个图片(直径取长宽最小值)Images.cut(int x, int y, int radius) 图像切割为圆形(按指定起点坐标和半径切割)图像切割(按指定起点坐标和宽高切割)Images.flip()水平翻转图像static Images从Image取图片并开始处理static Images从文件读取图片并开始处理static ImagesImages.from(InputStream in) 从流读取图片并开始处理static Images从URL取图片并开始处理static Images从Path读取图片并开始处理static ImagesImages.from(ImageInputStream imageStream) 从ImageInputStream取图片并开始处理static ImagesImages.from(org.miaixz.bus.core.io.resource.Resource resource) 从资源对象中读取图片并开始处理Images.gray()彩色转为灰度Images.pressImage(Image pressImg, int x, int y, float alpha) 给图片添加图片水印Images.pressImage(Image pressImg, Rectangle rectangle, float alpha) 给图片添加图片水印 如果源图片对象为BufferedImage,则绘制在源图片上,否则创建新的图片Images.pressImageFull(Image pressImage, int lineHeight, int degree, float alpha) 给图片添加全屏图片水印给图片添加文字水印 此方法只在给定位置写出一个水印字符串给图片添加文字水印 此方法只在给定位置写出一个水印字符串Images.pressTextFull(String pressText, Color color, Font font, int lineHeight, int degree, float alpha) 给图片添加全屏文字水印Images.rotate(int degree) 旋转图片为指定角度 来自:http://blog.51cto.com/cping1982/130066Images.round(double arc) 图片圆角处理Images.scale(float scale) 缩放图像(按比例缩放)Images.scale(int width, int height) 缩放图像(按长宽缩放) 注意:目标长宽与原图不成比例会变形Images.scale(int width, int height, int scaleType) 缩放图像(按长宽缩放) 注意:目标长宽与原图不成比例会变形等比缩放图像,此方法按照按照给定的长宽等比缩放图片,按照长宽缩放比最多的一边等比缩放,空白部分填充背景色 缩放后默认为jpeg格式Images.setBackgroundColor(Color backgroundColor) 设置图片的背景色Images.setPositionBaseCentre(boolean positionBaseCentre) 计算x,y坐标的时候是否从中心做为原始坐标开始计算Images.setQuality(double quality) 设置图片输出质量,数字为0~1(不包括0和1)表示质量压缩比,除此数字外设置表示不压缩Images.setQuality(float quality) 设置图片输出质量,数字为0~1(不包括0和1)表示质量压缩比,除此数字外设置表示不压缩Images.setTargetImageType(String imgType) 设置目标图片文件格式,用于写出描边,此方法为向内描边,会覆盖图片相应的位置描边,此方法为向内描边,会覆盖图片相应的位置写出图像为目标文件扩展名对应的格式Images.write(OutputStream out) 写出图像为结果设置格式 结果类型设定见setTargetImageType(String)Images.write(ImageOutputStream targetImageStream) 写出图像为结果设置格式 结果类型设定见setTargetImageType(String)