Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2005, 09:05 PM
dorjvar dorjvar is offline
Member
 
Join Date: May 2005
Posts: 38
Default convert Bmp to jpg

Hello dear friends
I want convert a bmp file to jpg
please help me (source code please )
thanks
your friend Dorjvar
Reply With Quote
  #2  
Old 07-06-2005, 09:59 PM
jamiguel77 jamiguel77 is offline
Senior Member
 
Join Date: Jan 2002
Posts: 1,171
Send a message via MSN to jamiguel77 Send a message via Yahoo to jamiguel77
Default RE: convert Bmp to jpg

hi easy:


procedure Bmp2Jpeg(const BmpFileName, JpgFileName: string);
var
Bmp: TBitmap;
Jpg: TJPEGImage;
begin
Bmp := TBitmap.Create;
Jpg := TJPEGImage.Create;
try
Bmp.LoadFromFile(BmpFileName);
Jpg.Assign(Bmp);
Jpg.SaveToFile(JpgFileName);
finally
Jpg.Free;
Bmp.Free;
end;
end;


also check:

http://www.swissdelphicenter.ch/torry/showcode.php?id=20

and

http://delphi.about.com/cs/adptips2001/a/bltip0301_3.htm


Accept if helped
Reply With Quote
  #3  
Old 07-07-2005, 01:52 PM
adixtopix adixtopix is offline
Senior Member
 
Join Date: Oct 2003
Posts: 730
Default RE: convert Bmp to jpg

the code is just fine, but do not forget to add JPEG unit to your uses clause

=========================================

=========================================
Reply With Quote
  #4  
Old 07-18-2005, 06:36 AM
othbel othbel is offline
Junior Member
 
Join Date: Jul 2005
Posts: 1
Default RE: convert Bmp to jpg

it's good solution but .;;;;;; it'have a probleme
concerning the size so an image jpg exemple 9Mo they will be 100Mo
i waiting for the solution
othbel@yahoo.fr

we create we existe
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 05:07 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.