Thema: Delphi Better sepia wanted

Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Better sepia wanted

  Alt 26. Jan 2010, 15:56
Hi. I'm looking for better method for sepialize image. Currently I'm using "open source" (similar implementation available everywhere in many languages) method:

Delphi-Quellcode:
Bits.R := (Bits.R + Bits.G + Bits.B) div 3;
Bits.G := Bits.R;
Bits.B := Bits.R;

Inc(Bits.R, AFactor * 2);
Inc(Bits.G, AFactor);

if Bits.R < (AFactor * 2) then Bits.R := 255;
if Bits.G < (AFactor) then Bits.G := 255;
I thought, that result is good till I saw sepialized image from PSP.

Do you know better algorithm?
  Mit Zitat antworten Zitat