What's the simplest way to desaturate a BufferedImage
?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Use
ColorConvertOp
:Update :
There is indeed a simpler way. You can use the
GrayFilter
class. What's nice about this class is that it provides a static utility method (i.e.createDisabledImage(Image i)
) that will return a grayed-out version of the imagei
.That being said, I think the simplest way to desaturate a
BufferedImage
instance is the following: