Image 相关的类
来源:互联网 发布:excel数据上下颠倒 编辑:程序博客网 时间:2024/05/22 03:15
1.
图片中信息:
图片的 长 宽
图片的上下文信息
图片的像素信息
Image: 抽象类,实现的子类:BufferedImage,VolatileImage
BufferedImage: 缓冲区的图片信息,图片信息与ColorModel 和 Raster组成。
Raster
getData(Rectangle rect)
计算并返回
BufferedImage
的一个任意区域。 WritableRaster
getRaster()
返回
WritableRaster
。 ImageProducer
getSource()
返回生成该图像像素的对象。
BufferedImage
getSubimage(int x, int y, int w, int h)
返回由指定矩形区域定义的子图像。
ImageIO:静态方法:
static boolean
write(RenderedImage im,String formatName,File output)
使用支持给定格式的任意
ImageWriter
将一个图像写入 File
。static boolean
write(RenderedImage im,String formatName,ImageOutputStream output)
使用支持给定格式的任意
ImageWriter
将一个图像写入 ImageOutputStream
。static boolean
write(RenderedImage im,String formatName,OutputStream output)
使用支持给定格式的任意
ImageWriter
将一个图像写入 OutputStream
。static BufferedImage
read(File input)
返回一个
BufferedImage
,作为使用 ImageReader
(它是从当前已注册 ImageReader 中自动选择的)解码所提供File
的结果。static BufferedImage
read(ImageInputStream stream)
返回一个
BufferedImage
,作为使用 ImageReader
(它是从当前已注册 ImageReader 中自动选择的)解码所提供ImageInputStream
的结果。static BufferedImage
read(InputStream input)
返回一个
BufferedImage
,作为使用 ImageReader
(它是从当前已注册 ImageReader 中自动选择的)解码所提供InputStream
的结果。static BufferedImage
read(URL input)
返回一个
BufferedImage
,作为使用 ImageReader
(它是从当前已注册 ImageReader 中自动选择的)解码所提供URL
的结果。static ImageInputStream
createImageInputStream(Object input)
返回一个
ImageInputStream
,它将从给定 Object
中获取输入。static ImageOutputStream
createImageOutputStream(Object output)
返回一个
ImageOutputStream
,它将其输出发送到给定 Object
。ImageReader:可以读取图片的信息
读取么某一个区域的内容等
ImageWrite:可以修改图片的信息
修改替换某一个区域的内容
ImageReadParam:
ImageWriterParan:
以上来那个对象用来指示读取的范围等参数
ColorConvertOp: 对于像素的操作,进行颜色转化,同时可以得到某一个区域的界框。
FilteredImageSource:接口,
该接口使用现有的图像和过滤器对象作为参数,并使用它们为原图像的新过滤版本产生图像数据。下面的示例通过交换红色和蓝色分量来过滤图像:
Image src = getImage("doc:///demo/images/duke/T1.gif"); ImageFilter colorfilter = new RedBlueSwapFilter(); Image img = createImage(new FilteredImageSource(src.getSource(), colorfilter));
AreaAveragingScaleFilter:
这是一个 ImageFilter 类,它使用一个简单的区域平均算法来进行图像缩放,该算法产生比其最相近算法更平滑的结果。
ImageProducer: 图片的像素对象 抽象类Graphics:图片的上下文
abstract void
clearRect(int x, int y, int width, int height)
通过使用当前绘图表面的背景色进行填充来清除指定的矩形。
abstract void
clipRect(int x, int y, int width, int height)
将当前剪贴区与指定的矩形相交。
abstract void
copyArea(int x, int y, int width, int height, int dx, int dy)
将组件的区域复制到由
dx
和 dy
指定的距离处。abstract Graphics
create()
创建一个新的
Graphics
对象,它是此 Graphics
对象的副本。 Graphics
create(int x, int y, int width, int height)
基于此
Graphics
对象创建一个新的 Graphics
对象,但是使用新的转换和剪贴区域。abstract void
dispose()
释放此图形的上下文以及它使用的所有系统资源。
void
draw3DRect(int x, int y, int width, int height, boolean raised)
绘制指定矩形的 3-D 高亮显示边框。
abstract void
drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
绘制一个覆盖指定矩形的圆弧或椭圆弧边框。
void
drawBytes(byte[] data, int offset, int length, int x, int y)
使用此图形上下文的当前字体和颜色绘制由指定 byte 数组给定的文本。
void
drawChars(char[] data, int offset, int length, int x, int y)
使用此图形上下文的当前字体和颜色绘制由指定字符数组给定的文本。
abstract boolean
drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
绘制指定图像中当前可用的图像。
abstract boolean
drawImage(Image img, int x, int y, ImageObserver observer)
绘制指定图像中当前可用的图像。
abstract boolean
drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
绘制指定图像中已缩放到适合指定矩形内部的图像。
abstract boolean
drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
绘制指定图像中已缩放到适合指定矩形内部的图像。
abstract boolean
drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
绘制当前可用的指定图像的指定区域,动态地缩放图像使其符合目标绘制表面的指定区域。
abstract boolean
drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
绘制当前可用的指定图像的指定区域,动态地缩放图像使其符合目标绘制表面的指定区域。
abstract void
drawLine(int x1, int y1, int x2, int y2)
在此图形上下文的坐标系中,使用当前颜色在点
(x1, y1)
和 (x2, y2)
之间画一条线。abstract void
drawOval(int x, int y, int width, int height)
绘制椭圆的边框。
abstract void
drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
绘制一个由 x 和 y 坐标数组定义的闭合多边形。
void
drawPolygon(Polygon p)
绘制由指定的
Polygon
对象定义的多边形边框。abstract void
drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
绘制由 x 和 y 坐标数组定义的一系列连接线。
void
drawRect(int x, int y, int width, int height)
绘制指定矩形的边框。
abstract void
drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
用此图形上下文的当前颜色绘制圆角矩形的边框。
abstract void
drawString(AttributedCharacterIterator iterator, int x, int y)
依据
TextAttribute
类的规范应用指定迭代器的属性,呈现迭代器的文本。abstract void
drawString(String str, int x, int y)
使用此图形上下文的当前字体和颜色绘制由指定 string 给定的文本。
void
fill3DRect(int x, int y, int width, int height, boolean raised)
绘制一个用当前颜色填充的 3-D 高亮显示矩形。
abstract void
fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
填充覆盖指定矩形的圆弧或椭圆弧。
abstract void
fillOval(int x, int y, int width, int height)
使用当前颜色填充外接指定矩形框的椭圆。
abstract void
fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
填充由 x 和 y 坐标数组定义的闭合多边形。
void
fillPolygon(Polygon p)
用图形上下文的当前颜色填充指定 Polygon 对象定义的多边形。
abstract void
fillRect(int x, int y, int width, int height)
填充指定的矩形。
abstract void
fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
用当前颜色填充指定的圆角矩形。
void
finalize()
一旦不再引用此图形上下文就释放它。
abstract Shape
getClip()
获取当前剪贴区域。
abstract Rectangle
getClipBounds()
返回当前剪贴区域的边界矩形。
Rectangle
getClipBounds(Rectangle r)
返回当前剪贴区域的边界矩形。
Rectangle
getClipRect()
已过时。 从 JDK version 1.1 开始,由
getClipBounds()
取代。abstract Color
getColor()
获取此图形上下文的当前颜色。
abstract Font
getFont()
获取当前字体。
FontMetrics
getFontMetrics()
获取当前字体的字体规格。
abstract FontMetrics
getFontMetrics(Font f)
获取指定字体的字体规格。
boolean
hitClip(int x, int y, int width, int height)
如果指定的矩形区域与当前的剪贴区域相交,则返回 true。
abstract void
setClip(int x, int y, int width, int height)
将当前剪贴区设置为由给定坐标指定的矩形。
abstract void
setClip(Shape clip)
将当前剪贴区域设置为任意的剪贴形状。
abstract void
setColor(Color c)
将此图形上下文的当前颜色设置为指定颜色。
abstract void
setFont(Font font)
将此图形上下文的字体设置为指定字体。
abstract void
setPaintMode()
设置将此图形上下文的绘图模式,以便通过此图形上下文中的当前颜色来覆盖目标。
abstract void
setXORMode(Color c1)
将此图形上下文的绘图模式设置为在此图形上下文的当前颜色和新的指定颜色之间交替。
abstract void
translate(int x, int y)
将图形上下文的原点平移到当前坐标系中的点 (x, y)。(旋转功能)
0 0
- Image 相关的类
- Image图片的相关工具类
- C# Image的相关问题
- Image相关的数据类型转换和用法
- QML中有关image的相关属性
- Wince image相关工具
- image处理相关
- Universal-Image-Loader相关
- Image类的序列化
- |Image$$RO$$Limit|相关问题
- docker运行image相关命令
- [挖坑--截止日期2017-12-30]---Image Inpainting相关的论文解读
- 一个关于Button Image的类
- 医学影像处理软件之Image Orientation相关介绍
- Universal-Image-Loader 相关配置注释详解
- 48. Rotate Image(数学矩阵相关知识)
- Deep Image Harmonization 文章相关代码信息
- grub-image的使用
- iOS-浅谈runtime运行时机制02-runtime简单使用
- [你必须知道的异步编程]C# 5.0 新特性——Async和Await使异步编程更简单
- hdu4046 不错的线段树单点更新
- shell编程总结
- 八一八C语言中那些稀奇古怪的类型!
- Image 相关的类
- IsWow64并不能用来检测是否是Windows 32bit系统还是64bit系统
- 如果此程序没有正确安装,请选用与此版本兼容的设置重新安装”C#程序的解决办法
- Android CTS兼容性测试
- Qt For Android
- debian修改apt-get安装源
- 正则表达式30分钟入门教程
- 侧边栏交互的利弊
- 约瑟夫环问题