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 convert a Jpeg image to a Bitmap image. 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
Convert Jpeg to Bitmap 04-May-04
Category
Graphic
Language
Delphi All Versions
Views
395
User Rating
10
# Votes
2
Replies
0
Publisher:
Darley, F. Joe
Reference URL:
			1   
2   unit Unit1;
3   
4   interface
5   
6   uses
7     Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
8     Dialogs, StdCtrls,jpeg;
9   
10  type
11    TForm1 = class(TForm)
12      Button1: TButton;
13      procedure Button1Click(Sender: TObject);
14    private
15      { Private declarations }
16    public
17      { Public declarations }
18      procedure JPEGtoBMP(const FileName: TFileName);
19    end;
20  
21  var
22    Form1: TForm1;
23  
24  implementation
25  
26  {$R *.dfm}
27  
28  procedure TForm1.Button1Click(Sender: TObject);
29  begin
30     JPEGtoBMP('C:\test.jpg');
31  end;
32  
33  procedure TForm1.JPEGtoBMP(const FileName: TFileName);
34  var
35    jpeg: TJPEGImage;
36    bmp:  TBitmap;
37  begin
38    jpeg := TJPEGImage.Create;
39    try
40      jpeg.CompressionQuality := 100; {Default Value}
41      jpeg.LoadFromFile(FileName);
42      bmp := TBitmap.Create;
43      try
44        bmp.Assign(jpeg);
45        bmp.SaveTofile(ChangeFileExt(FileName, '.bmp'));
46      finally
47        bmp.Free
48      end;
49    finally
50      jpeg.Free
51    end;
52  end;
53  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