Image Contrast and Brightness

Image Contrast and Brightness

Post by Shaw » Fri, 06 Jun 2003 22:47:13



I'd like to know
If there a way to change a TImage contrast and brightness
Then save the new TImage

Shawn

 
 
 

Image Contrast and Brightness

Post by Maynard Philbroo » Sat, 07 Jun 2003 01:03:09


you must read the pixels and adjust the RGB values.
with Brightness you simple multiply the R,G B values by a marge
 for example.
  R := Round(R*1.2); if R > 255 then R := 255;
same for G and B..
 for constrast you can use the  center pole method..
Dif := Sqrt(R/128)
 R :=Round(R*Dif); if R > 255 then R := 255;

ect..


> I'd like to know
> If there a way to change a TImage contrast and brightness
> Then save the new TImage

> Shawn


 
 
 

1. Brightness and contrast adjustment of bitmap images

Dear all-

I wonder if someone can help me...I have searched in vain for this.  I
need to implement brightness and contrast adjustment of bitmap images,
similar to that found in PaintShopPro and other raster image packages.

We have a system where images are retrieved from a scanner (which has
brightness and contrast controls), but I need to allow the user to fine
tune brightness and contrast after the scan, hence the requirement.  I
realise you would only get a small range of adjustment.

The images are 24 bit colour windows DIBs, fwiw.  Also, in case anyone
knows of code samples, the project is Delphi based, but I am happy with
C/C++ also and can port Unix code.

Even if anyone can give general information, or clues as to what
algorithms to use, it would be much appreciated.

Many thanks in advance.

John Carlyle-Clarke

___________________________________
Tot hominem quot sententiae.

john dot cc at europlacer dot co dot uk

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Business Shareware Webring Resource

3. Image Brightness/Contrast Question

4. LW6.5 r2 beta, Multi-threading issue + Baker issue

5. GraphicConverter Brightness/Contrast batch processing with Applescript?

6. Where's that MAX benchmark page again please?

7. Brightness/contrast in paintshop pro takes ages

8. Calibration of CRT brightness and contrast settings for filming

9. How to change BMP brightness and contrast?

10. Windows contrast and brightness

11. Brightness & contrast problem

12. Automatic contrast/ brightness adjustment