Thema: Delphi Farbwert zu Dezimal

Einzelnen Beitrag anzeigen

Klaus01
Online

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#58

AW: Farbwert zu Dezimal

  Alt 29. Mär 2019, 14:14
ein letztes update
alpha ist wieder ein Byte (ich fühl mich wohler damit)

Delphi-Quellcode:
           for y:= 0 to h do
             for x := 0 to w do
               begin

                 alpha := ((imgSpectrum[x,y] and $FF000000) shr 24) and $FF;
                 c := imgSpectrum[x,y] and $FFFFFF;

                 if d > alpha then
                   alpha := 0
                 else
                   alpha := alpha - d;

                 if alpha > 127 then
                   imgSpectrum[x,y] := c or ((alpha -256) shl 24)
                 else
                   imgSpectrum[x,y] := c or (alpha shl 24);
               end;
Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat