mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-14 18:05:55 -07:00
allow effort param for png encoding when palette is true
This commit is contained in:
parent
83be955624
commit
0b6895720c
4 changed files with 11 additions and 3 deletions
5
vips.h
5
vips.h
|
|
@ -330,14 +330,17 @@ vips_jpegsave_bridge(VipsImage *in, void **buf, size_t *len, int strip, int qual
|
|||
}
|
||||
|
||||
int
|
||||
vips_pngsave_bridge(VipsImage *in, void **buf, size_t *len, int strip, int compression, int quality, int interlace, int palette) {
|
||||
vips_pngsave_bridge(VipsImage *in, void **buf, size_t *len, int strip, int compression, int quality, int interlace, int palette, int speed) {
|
||||
#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
|
||||
);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue