mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 01:37:26 +00:00
Fix JXL encoder
This commit is contained in:
@@ -12,10 +12,11 @@ val encode(std::string image, int width, int height) {
|
|||||||
// jxl::ThreadPool pool;
|
// jxl::ThreadPool pool;
|
||||||
jxl::CodecInOut io;
|
jxl::CodecInOut io;
|
||||||
jxl::PaddedBytes bytes;
|
jxl::PaddedBytes bytes;
|
||||||
|
jxl::ImageBundle *main = &io.Main();
|
||||||
|
|
||||||
cparams.speed_tier = jxl::SpeedTier::kFalcon;
|
cparams.speed_tier = jxl::SpeedTier::kFalcon;
|
||||||
|
cparams.color_transform = jxl::ColorTransform::kNone;
|
||||||
jxl::ImageBundle *main = &io.Main();
|
uint8_t *inBuffer = (uint8_t *)image.c_str();
|
||||||
|
|
||||||
auto result = main->SetFromSRGB(
|
auto result = main->SetFromSRGB(
|
||||||
width, height, false, true, true, (uint8_t *)image.c_str(),
|
width, height, false, true, true, (uint8_t *)image.c_str(),
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user