public interface BufferedImageOp
BufferedImage
オブジェクトに対して実行される単一入力操作と単一出力操作を記述します。このインタフェースは、AffineTransformOp
、ConvolveOp
、ColorConvertOp
、RescaleOp
、およびLookupOp
によって実装されます。これらのオブジェクトをBufferedImageFilter
に渡すことにより、ImageProducer-ImageFilter-ImageConsumerのパラダイムでBufferedImage
に作用させることができます。
このインタフェースを実装するクラスは、配置済みフィルタ操作(転送元オブジェクトと転送先オブジェクトが等しい)を許可するかどうかを指定する必要があります。
このインタフェースは、複数の転送元をとるような、より洗練された操作の記述には使用できません。この制限により、操作に先行する転送先ピクセルの値はフィルタ操作の入力として使用されません。
修飾子と型 | メソッドと説明 |
---|---|
BufferedImage |
createCompatibleDestImage(BufferedImage src, ColorModel destCM)
適切なサイズおよびバンド数で、ゼロ化された転送先イメージを生成します。
|
BufferedImage |
filter(BufferedImage src, BufferedImage dest)
BufferedImage で単一入力操作を実行します。 |
Rectangle2D |
getBounds2D(BufferedImage src)
フィルタ処理された転送先イメージのバウンディング・ボックスを返します。
|
Point2D |
getPoint2D(Point2D srcPt, Point2D dstPt)
指定された転送元イメージのポイントに対応する転送先のポイントの位置を返します。
|
RenderingHints |
getRenderingHints()
このオペレーションの描画ヒントを返します。
|
BufferedImage filter(BufferedImage src, BufferedImage dest)
BufferedImage
で単一入力操作を実行します。2つのイメージのカラー・モデルが一致しない場合は、転送先のカラー・モデルへの変換が実行されます。転送先イメージがnullの場合、適切なColorModel
を持つBufferedImage
が作成されます。
転送元イメージおよび転送先イメージ、またはそのどちらかが、このフィルタを実装するクラスによって許可されるイメージの形式と互換性がない場合は、IllegalArgumentException
がスローされます。
src
- フィルタ処理されるBufferedImage
。dest
- 結果が格納されるBufferedImage
BufferedImage
。IllegalArgumentException
- 転送元イメージまたは転送先イメージ、あるいはその両方がこのフィルタを実装するクラスによって許可されるイメージの形式と互換性がない場合。Rectangle2D getBounds2D(BufferedImage src)
IllegalArgumentException
がスローされます。src
- フィルタ処理されるBufferedImage
。Rectangle2D
。BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM)
IllegalArgumentException
がスローされます。src
- フィルタ処理されるBufferedImage
。destCM
- 転送先のColorModel
。nullの場合、転送元のColorModel
が使用される。Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
dstPt
が指定されている場合、そのdstPtが戻り値を保持します。srcPt
- 転送元イメージのポイントを表すPoint2D
dstPt
- 結果が格納されるPoint2D
Point2D
。RenderingHints getRenderingHints()
BufferedImageOp
のRenderingHints
オブジェクト。ヒントが設定されていない場合はnullを返す バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.Use is subject to license termsDocumentation Redistribution Policyも参照してください。