What’s the simplest way to desaturate a BufferedImage?
What’s the simplest way to desaturate a BufferedImage ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
ColorConvertOp:Update :
There is indeed a simpler way. You can use the
GrayFilterclass. 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
BufferedImageinstance is the following: