aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to increase/decrease brightness of an image with the use of JSlider slider or JScrollBar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to increase/decrease brightness of an image with the use of JSlider slider or JScrollBar" Watch "How to increase/decrease brightness of an image with the use of JSlider slider or JScrollBar" New topic
Author

How to increase/decrease brightness of an image with the use of JSlider slider or JScrollBar

ashish donvir
Greenhorn

Joined: Mar 01, 2012
Posts: 25
i Had load my image Buffered image now need to brighten it using Slider or scroll-bar so could any one suggest me how to do it? If it can done using any ImageJ library then suggest me that also.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

You can use a RescaleOp. Check out this tutorial.


luck, db
There are no new questions, but there may be new answers.
ashish donvir
Greenhorn

Joined: Mar 01, 2012
Posts: 25
is there any other help...........
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

Why, did you find RescaleOp unsuitable for your purpose?
ashish donvir
Greenhorn

Joined: Mar 01, 2012
Posts: 25
provide me full code....
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

We are NotACodeMill <-- link. You need to ShowSomeEffort <-- link

If you can't achieve your purpose, be sure to IsolateTheProblem <-- link and TellTheDetails <-- link. Remember that ItDoesntWorkIsUseless <-- link
ashish donvir
Greenhorn

Joined: Mar 01, 2012
Posts: 25
OK I will try something for sure but right now first i am trying to plot histogram of an image so suggest me that how could i plot my histogram in a JPanel or content pane.
I got the the histogram using Jai now need to plot it somehow

Here is how i am getting my histogram

PlanarImage image = JAI.create("fileload", "C:\\Sunset.jpg");
ParameterBlock pb = new ParameterBlock();
pb.addSource(image);
pb.add(null); // The ROI.
pb.add(1); // Samplings.
pb.add(1);
pb.add(new int[]{256}); // Num. bins.
pb.add(new double[]{0}); // Min value to be considered.
pb.add(new double[]{256}); // Max value to be considered.
// Creates the histogram.
PlanarImage temp = JAI.create("histogram", pb);
Histogram h = (Histogram)temp.getProperty("histogram");
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> how could i plot my histogram in a JPanel or content pane. 

tried google?
ashish donvir
Greenhorn

Joined: Mar 01, 2012
Posts: 25
Yes Michael, I can plot it using ImajeJ library but the thing is i need to have my own histogram so that i can be helpful to me in my further image processing
so suggest me some way to plot it
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> so suggest me some way to plot it

I did.

unless you're the only person to have ever wanted to plot a histogram in java,
there should be heaps of sample code out there.

grab some of the code, modify to suit, then, if you have problems,
you can post the code you've tried.

if you're waiting for someone to write it for you, there's rent-a-coder for that
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to increase/decrease brightness of an image with the use of JSlider slider or JScrollBar
 
Similar Threads
Slider Woes
java.lang.OutOfMemory error
convert image(.jpg) in to binary format using java
jQuery horizontal image slider
How to add slider / knob to JScrollPane