?
Solved

Change contrast in Java BufferedImage

Posted on 2011-05-05
7
Medium Priority
?
2,216 Views
Last Modified: 2013-11-23
I need to change the contrast (and maybe the brightness) of an image in Java. It is a BufferedImage that I create, and it is made of different geometrical items. I have to change the contrast of only some of these items. The items to be changed are all of the same color.
Also, these elements are traslucent, so I am using Transparency.TRANSLUCENT function.
I don't know how contrast and transparency interact...

Thanks
0
Comment
Question by:v_alev
  • 3
  • 2
6 Comments
 

Author Comment

by:v_alev
ID: 35698049
But I have to change the contrast of only one color relative to the background, not all the image.
Can you suggest a way to do that?
0
 
LVL 92

Expert Comment

by:objects
ID: 35702647
you can just change the color table (ColorModel) of the image to achieve that
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:v_alev
ID: 35735740
Can you be more specific?
Which is the part of the code that influence the contrast?
Also, do you know how transparency and contrast interact?
0
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 35736177
Contrast multiplies colour values by a scale factor.
It has nothing to do with transparency

you can achieve it by using either a RescaleOp, or by adjusting the colour mappings in the colour table
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 36923072
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question