طيب .. الكود هاذا عشان تشفر صورة داخل برنامجك .. حقيقة انا ما قدرت لاقيله استخدام او ضرورة .. متل ما بيقولو .. بس عجبني
وفكرتو كتير بسيطو وواضحة .. عشا ان يفيد احدكم ..
procedure EncryptBMP(const BMP: TBitmap; Key: Integer);
var
BytesPorScan: Integer;
w, h: integer;
p: pByteArray;
begin
try
BytesPorScan := Abs(Integer(BMP.ScanLine[1]) -
Integer(BMP.ScanLine[0]));
except
raise Exception.Create('Error');
end;
RandSeed := Key;
for h := 0 to BMP.Height - 1 do
begin
P := BMP.ScanLine[h];
for w := 0 to BytesPorScan - 1 do
P^[w] := P^[w] xor Random(256);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
EncryptBMP(Image1.Picture.Bitmap, 623);
Image1.Refresh;
end;عموما المثال مرفق ..
وتحياتي الحارة