Friday, March 12, 2021

Watermark image photo

+

https://stackoverflow.com/questions/10516968/delphi-how-add-text-to-an-image-and-save-the-new-image


uses
  PNGImage;

procedure TForm1.Button1Click(Sender: TObject);
var
  PNGImage: TPNGImage;
  BlobStream: TMemoryStream;
begin
  // create the PNG image instance
  PNGImage := TPNGImage.Create;
  try
    // assuming you have in the BlobStream variable the image from a DB loaded
    PNGImage.LoadFromStream(BlobStream);
    // setup the text background to be transparent
    PNGImage.Canvas.Brush.Style := bsClear;
    // optionally configure the font
    PNGImage.Canvas.Font.Size := 11;
    PNGImage.Canvas.Font.Color := clRed;
    PNGImage.Canvas.Font.Style := [fsBold];
    // and render it to the image's canvas
    PNGImage.Canvas.TextOut(5, 5, 'SomeText');
    // save this modified image to the file
    PNGImage.SaveToFile('c:\picture.png');
  finally
    // and finally free the PNG image instance
    PNGImage.Free;
  end;
end;


//------------------

uses
  GraphUtil, PNGImage;

procedure CreateCard(const AFileFile: string; AImage: TPNGImage;
  const AName, ASurname: string);
begin
  with TPNGImage.CreateBlank(COLOR_RGB, 8, 330, 160) do
  try
    GradientFillCanvas(Canvas, clWhite, $000080FF,
      Canvas.ClipRect, gdVertical);
    Canvas.StretchDraw(Rect(18, 18, 108, 108), AImage);
    Canvas.Pen.Width := 2;
    Canvas.Brush.Style := bsClear;
    Canvas.Rectangle(5, 5, Width - 4, Height - 4);
    Canvas.Font.Size := 12;
    Canvas.Font.Style := [fsBold];
    Canvas.TextOut(110, 30, 'Form:  ' + AName + '  :.');
    Canvas.TextOut(125, 60, 'Genus:  ' + ASurname + '  :.');
    SaveToFile(AFileFile);
  finally
    Free;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  PNGImage: TPNGImage;
begin
  PNGImage := TPNGImage.Create;
  try
    // here you will load the image blob (by using LoadFromStream)
    // instead of LoadFromFile
    PNGImage.LoadFromFile('d:\llamas.png');
    CreateCard('d:\visit-card.png', PNGImage, 'Alpaca', 'Lama');
  finally
    PNGImage.Free;
  end;
end;

+


++



' or 1=1;--


https://voyagerlive.org/

https://emmabuntus.org/

https://embeddedinventor.com/best-linux-distros-with-wine-preinstalled-an-analysis/

https://ualinux.com/en/ubuntu-gamepack

https://embeddedinventor.com/proton-vs-wine-differences-explained/

https://store.steampowered.com/steamos/


Pametni odlaze vani, glupi životare !

No comments:

Post a Comment

Beogradsko programiranje=