Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7909935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:39:48+00:00 2026-06-03T12:39:48+00:00

the idea is retrieve date from a database (text and a picture) then add

  • 0

the idea is retrieve date from a database (text and a picture) then add these data in another picture (like an ID form) then save the new picture.

how can this be done in delphi?

thx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:39:49+00:00Added an answer on June 3, 2026 at 12:39 pm

    Try the following:

    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;
    

    Here is an example how would I create my visit card (don’t forget to save the necessary image file as d:\llamas.png):

    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;
    

    Here is how it looks like:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have any idea how to retrieve deleted records data from Apex data
I would like to write a scraping script to retrieve comments from cnn articles.
I am storing data in Sqlite Database along with the date of insertion. The
idea I would like to create a little app for myself to store ideas
Idea: I want to make smth like real time electronic blackboard. Many users have
The Idea I have a main PHP page that loads content in DIV's from
My idea is to make an application start automatically when a message from a
Basically, I am doing something like this: select a.name from schedule as a where
I'm creating a date like this : NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateFormatter
I would like to store data in Generic Dictionary with keys that match over

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.