aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/MacOSX/Wrapper/JPEG.pas
diff options
context:
space:
mode:
authoreddie-0815 <eddie-0815@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-29 21:40:14 +0000
committereddie-0815 <eddie-0815@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-29 21:40:14 +0000
commit52eeec05d021df5334934f50dfafff981cbca33b (patch)
treea5f459e4b3065312820250e6c4ecbc1c7fcc6e0d /Game/Code/MacOSX/Wrapper/JPEG.pas
parente779d4f8a8ca13215895338f71e6929dc795cf60 (diff)
downloadusdx-52eeec05d021df5334934f50dfafff981cbca33b.tar.gz
usdx-52eeec05d021df5334934f50dfafff981cbca33b.tar.xz
usdx-52eeec05d021df5334934f50dfafff981cbca33b.zip
Just adding first MacOSX version. This does not compile yet.
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@540 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rwxr-xr-xGame/Code/MacOSX/Wrapper/JPEG.pas34
1 files changed, 34 insertions, 0 deletions
diff --git a/Game/Code/MacOSX/Wrapper/JPEG.pas b/Game/Code/MacOSX/Wrapper/JPEG.pas
new file mode 100755
index 00000000..b6a90f00
--- /dev/null
+++ b/Game/Code/MacOSX/Wrapper/JPEG.pas
@@ -0,0 +1,34 @@
+unit JPEG;
+
+{$INCLUDE ../Platform.inc}
+
+interface
+
+uses GlueGraphics;
+
+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.
+