From e5406e5eca3551c0edc48421c222146745ee08f2 Mon Sep 17 00:00:00 2001 From: awxkee Date: Fri, 22 Mar 2024 18:15:15 +0000 Subject: [PATCH] fixed quality --- JxlCoder.podspec | 2 +- Sources/jxlc/JxlJpegLiEncoder.mm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/JxlCoder.podspec b/JxlCoder.podspec index e9e14b2..22e29f0 100644 --- a/JxlCoder.podspec +++ b/JxlCoder.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'JxlCoder' - s.version = '1.7.0' + s.version = '1.7.1' s.summary = 'JXL coder for iOS and MacOS' s.description = 'Provides support for JXL files in iOS and MacOS' s.homepage = 'https://github.com/awxkee/jxl-coder-swift' diff --git a/Sources/jxlc/JxlJpegLiEncoder.mm b/Sources/jxlc/JxlJpegLiEncoder.mm index e9dad87..0ef5092 100644 --- a/Sources/jxlc/JxlJpegLiEncoder.mm +++ b/Sources/jxlc/JxlJpegLiEncoder.mm @@ -62,6 +62,7 @@ + (nullable NSData *)encode:(nonnull JXLSystemImage *)platformImage try { jxlcoder::JPEGLIEncoder encoder(mRGBASource.data(), stride, width, height, useXYB ? jxlcoder::JPEGLI_COMPRESSION_MODE_XYB : jxlcoder::JPEGLI_COMPRESSION_MODE_DEFAULT); + encoder.setQuality(quality); std::vector encoded = encoder.encode(); JxlJpegLiDataWrapper* dataWrapper = new JxlJpegLiDataWrapper(); dataWrapper->data = encoded;