bimg
bimg copied to clipboard
pngsave_buffer: no property named `effort`
It seems that vips 8.10.2 (in fact no version before 8.12 I think ???) doesn't have 'effort' listed in optional arguments for pngsave operation while the latest code passes such argument; inside the vips.h file, vips_pngsave_bridge function :
if (VIPS_MAJOR_VERSION >= 8 && VIPS_MINOR_VERSION >= 7)
int effort = 10 - speed;
return vips_pngsave_buffer(in, buf, len,
"strip", INT_TO_GBOOLEAN(strip),
"compression", compression,
"interlace", INT_TO_GBOOLEAN(interlace),
"filter", VIPS_FOREIGN_PNG_FILTER_ALL,
"palette", INT_TO_GBOOLEAN(palette),
"Q", quality,
"effort", effort,
NULL
);
Yup, got an error related to this. I downgraded bimg from 1.7 to 1.6 and everything works.
The code change related is probably this: https://github.com/h2non/bimg/issues/397 & https://github.com/h2non/bimg/pull/398/files
In the v2-dev branch this is also fixed. However I bumped the minimum required version of vips to 8.10 (since it's not feasible to test and maintain older versions).
Hi @tashaX, you need to have latest libvips version. This works well on latest 8.12 version. https://github.com/libvips/libvips/blob/master/libvips/foreign/pngsave.c#L551