blob: 7419908b6a287f86d0853d5c75ac132f3a895415 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
unit JPEG;
{$I switches.inc}
interface
uses Graphics;
type
TJPEGImage = class(TBitmap)
private
FCompressionQuality : Integer;
public
Procedure SaveToFile(const f : String); override;
property CompressionQuality : Integer read FCompressionQuality write FCompressionQuality;
end;
implementation
uses FreeImage;
{ TJPEGImage }
procedure TJPEGImage.SaveToFile(const f: String);
begin
if CompressionQuality = 0 then begin
CompressionQuality := 95;
end;
FImage.Save( f, CompressionQuality);
end;
end.
|