Delphi Sources

Преобразовать JPEG в BMP




uses 
  JPEG; 

procedure JPEGtoBMP(const FileName: TFileName); 
var 
  jpeg: TJPEGImage; 
  bmp:  TBitmap; 
begin 
  jpeg := TJPEGImage.Create; 
  try 
    jpeg.CompressionQuality := 100; {Default Value} 
    jpeg.LoadFromFile(FileName); 
    bmp := TBitmap.Create; 
    try 
      bmp.Assign(jpeg); 
      bmp.SaveTofile(ChangeFileExt(FileName, '.bmp')); 
    finally 
      bmp.Free 
    end; 
  finally 
    jpeg.Free 
  end; 
end; 


{ 
  CompressionQuality (default 100): 
  Set a value between 1..100, depending on your need of quality and 
  image file size. 1 = Smallest file size, 100 = Best quality. 
}





Похожие по теме исходники

Load JPEG from RES

Convert JPEG to PDF

Jpeg Errors

BmpHViewer

 

YV-12 or YVU-9 to BMP

BMP Song Creator




Copyright © 2004-2025 "Delphi Sources" by BrokenByte Software. Delphi World FAQ

Группа ВКонтакте