function SetRGBChannelValue(Bitmap: TBitmap; Red, Green, Blue: Integer): Boolean;
var
i, j: Integer;
rgbc: array[0..2] of Byte;
c: TColor;
r, g, b: Byte;
begin
//If there is no change, exit:
if (Red = 0) and (Green = 0) and (Blue = 0) then
begin
Result := False;
Exit;
end;
for i := 0 to Bitmap.Height do
begin
for j := 0 to Bitmap.Width do
begin
// Get the old Color
c := Bitmap.Canvas.Pixels[j, i];
// Splitt the old color into the different colors:
rgbc[0] := GetRValue(c);
rgbc[1] := GetGValue(c);
rgbc[2] := GetBValue(c);
//Check that there is no "new" color while the addition
//of the values:
if not (rgbc[0] + Red < 0) and not (rgbc[0] + Red > 255) then
rgbc[0] := rgbc[0] + Red;
if not (rgbc[1] + Green < 0) and not (rgbc[1] + Green > 255) then
rgbc[1] := rgbc[1] + Green;
if not (rgbc[2] + Blue < 0) and not (rgbc[2] + Blue > 255) then
rgbc[2] := rgbc[2] + Blue;
r := rgbc[0];
g := rgbc[1];
b := rgbc[2];
//set the new color back to the picture:
Bitmap.Canvas.Pixels[j, i] := RGB(r, g, b);
end;
end;
Result := True;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
SetRGBChannelValue(Image1.picture.Bitmap, 192, 79, 172);
end;

Set Bitmap RGB Channel
Abonnieren
Posts (Atom)
Beliebte Posts
-
Windows Key Sniffer 0.82 - Update 08/2024 Der Windows Key Sniffer hat mir im Laufe der Zeit viel Arbeit erspart und unterstützt, viele Wi...
-
Network Source Code Update Source Code Network Update : https://asciigen.blogspot.com/p/network.html Send Message 1.0 Source Server Client ...
-
Windows Defender Bypass Version 0.75 - Update 11/2024 Den Windows 10-eigenen Virenschutz Defender kann man auf mehreren Wegen abschalt...
-
ASCii GIF Animator Update Version 0.68 (32 bit) - 11/2024 Bei dieser überarbeiteten Version ist die Kompatibilität zu den verschiedenen...
-
MD5 Hacker v.0.26 - Update 08.2024 MD5 Hashs sollten eigentlich nicht entschlüsselt werden können. Jedoch gibt es Tools, mit welchen auch ...
-
Dir Sniffer Version 0.11 - Update 02/2025 Dir Sniffer ist ein kleines aber nützliches Tool um herauszufinden, was ihr Programm auf ihrem...
-
Host Editor Version 0.65 - Update 01/2025 Hosts File Editor allows for the easy editing of host files and backup creation. Create your ...
-
Oldskool Font Generator v.0.29 - Update 11/2023 Das Tool stell 508 Bitmap Fonts zu Verfügung. Eigene Fonts können integriert werden, sie...
-
Hard Crypter 0.19 - Update 12/2023 Mit diesem Tool können Sie jede beliebige Datei auf dem Windows-System verschlüsseln. Die Byte-Erse...
Keine Kommentare:
Kommentar veröffentlichen