Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to change Text to GIF Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
24-Jan-03
Category
System
Language
Delphi 2.x
Views
126
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Lou Adler

Text to GIF

Answer:
1   
2   procedure TxtToGif(txt, FileName: string);
3   var
4     temp: TBitmap;
5     GIF: TGIFImage;
6   begin
7   
8     temp := TBitmap.Create;
9     try
10      temp.Height := 400;
11      temp.Width := 60;
12      temp.Transparent := True;
13      temp.Canvas.Brush.Color := colFondo.ColorValue;
14      temp.Canvas.Font.Name := Fuente.FontName;
15      temp.Canvas.Font.Color := colFuente.ColorValue;
16      temp.Canvas.TextOut(10, 10, txt);
17      Imagen.Picture.Assign(nil);
18  
19      GIF := TGIFImage.Create;
20      try
21        // Convert the bitmap to a GIF
22        GIF.Assign(Temp);
23        // Save the GIF
24        GIF.SaveToFile(FileName);
25        // Display the GIF
26        Imagen.Picture.Assign(GIF);
27      finally
28        GIF.Free;
29      end;
30  
31    finally
32  
33      temp.Destroy;
34    end;
35  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC