图像——Java 2D Oracle官方教程翻译(双语对照)

本文翻译自Oracle官方教程
<<Previous • Trail • Next>>

Images

In the Java 2D API an image is typically a rectangular two-dimensional array of pixels, where each pixel represents the color at that position of the image and where the dimensions represent the horizontal extent (width) and vertical extent (height) of the image as it is displayed.

在Java 2D API中图像是典型的像素的矩形二维数组。每一个像素都描述了其所在位置的图像颜色。两个维度分别描述了图像在水平方向上的大小(宽)和在垂直方向上的大小(高)


The most important image class for representing such images is the java.awt.image.BufferedImage class. The Java 2D API stores the contents of such images in memory so that they can be directly accessed.

代表这样的图像的最重要的类就是java.awt.image.BufferedImage。Java 2D API将这样的图像内容保存在内存中以便直接访问。


Applications can directly create a BufferedImage object or obtain an image from an external image format such as PNG or GIF.

应用程序可以直接创建BufferedImage对象,也可以从外部图像格式(比如PNG或GIF)获取图像。


In either case, the application can then draw on to image by using Java 2D API graphics calls. So, images are not limited to displaying photographic type images. Different objects such as line art, text, and other graphics and even other images can be drawn onto an image (as shown on the following images).

在这两种情况下,应用程序都可以使用Java 2D API制图接口继续在图像上作画。所以这里的图像并不限制必须是摄影类型的。不同的对象如线条艺术,文本和其他图画甚至其他图像都可以画在一个图像上面(如下图所示)。


The Java 2D API enables you to apply image filtering operations to BufferedImage and includes several built-in filters. For example, the ConvolveOp filter can be used to blur or sharpen images.

Java 2D API使你可以对BufferedImage应用图像过滤操作,并内置了一些过滤器。例如ConvolveOp过滤器可以用来模糊或锐化图像。


<<Previous • Trail • Next>>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值