bimg icon indicating copy to clipboard operation
bimg copied to clipboard

pngsave_buffer: no property named `effort`

Open tashaX opened this issue 2 years ago • 3 comments

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
	  );

tashaX avatar Mar 15 '22 13:03 tashaX

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

gjermundgaraba avatar Mar 27 '22 13:03 gjermundgaraba

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).

aksdb avatar Mar 29 '22 13:03 aksdb

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

vaibsharma avatar Apr 06 '22 15:04 vaibsharma