The quality factor for the current JPEG image. Range is 1 to 100, though typical range is 60 (low quality) to 95 (high quality).
Higher values will improve image quality but require more disk space.
// Test Code var i, qual: Integer; bmp: TIEBitmap; begin for i := 1 to 20 do begin qual := i * 5; bmp := TIEBitmap.Create(); bmp.ParamsEnabled := True; bmp.LoadFromFile( TestFilename ); bmp.Params.JPEG_Quality := qual; bmp.SaveToFile( 'Test_'+IntToStr( qual )+'.jpg' ); bmp.Free;
// Load a JPEG and save it using the same compression quality ImageEnView1.IO.LoadFromFile('C:\input.jpg'); ImageEnView1.IO.Params.JPEG_Quality := IECalcJpegFileQuality('C:\input.jpg'); ImageEnView1.IO.SaveToFile('D:\output.jpg');
// Convert a BMP to a JPEG at 90% quality bmp := TIEBitmap.Create(); bmp.ParamsEnabled := True; bmp.LoadFromFile( 'D:\input.bmp' ); bmp.Params.JPEG_Quality := 90; bmp.SaveToFile( 'D:\output.jpg' ); bmp.Free;