How to convert BMP files to JPG files, how to convert JPG files in Delphi?

zhaozj2021-02-11  219

How to convert BMP files to JPG files, how to convert JPG files in Delphi?

Answer netizen question: ============================================== ============================== How to convert BMP files to JPG files, how to convert in Delphi can be loaded: JPG file? : <=================================================== ======================== This netizen, if you use Delphi4, note that its TIMAGE supported file format can be * .jpg, *. JPEG, *. BMP, *. ICO ... This problem will be well resolved! The following is the source code: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<<<<<<<<< procedure tform1.button1click (sender: TOBJECT); (* Compressed MBP is JPEG; but does not provide compression than optional, about 1/3 ^ _ ^: Note: You must add JPEG to USES unit *) var myjpeg: tjpegimage; mybmp: tbitmap; begin mybmp: = tbitmap.create; with mybmp do tryfromfile ('E: /LM.BMP'); // You Image location myjpeg: = tjpegimage.create; with myjpeg do begin assign (mybmp); compressionQuality: = 10; // Compression ratio compress; savetofile ('e: /Lm01.jpeg'); // Save path ... free; End; end;

转载请注明原文地址:https://www.9cbs.com/read-3996.html

New Post(0)