Jump to content
Incus J

How to set JPEG quality in Firemonkey?

Recommended Posts

I'm having difficulty saving a JPEG file in Firemonkey.  Here's the code:

procedure SaveImage(bmp:TBitmap; filename:string);
var
  vOpt:TBitmapCodecSaveParams;
begin
  vOpt.Quality:=20; //Quality setting ignored? :(
  bmp.SaveToFile(filename,@vOpt);
end;

On Windows everything seems OK, however when the program is compiled for MacOS the resulting JPEG file is not at the Quality specified.  The image quality setting seems to be ignored.  How do I set the JPEG output quality on MacOS?  (Delphi Tokyo 10.2.3)

Share this post


Link to post

Can anyone recommend a 3rd party JPEG library that works with Firemonkey?  It would need to be fairly self-contained I think, so it would work on both Windows and MacOS.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×