Zhaohu Xing

Results 13 comments of Zhaohu Xing

> Hello @2h4dl, use `thumbnail`, it has extra logic for resizing animated images. > > ```python > thumb = pyvips.Image.thumbnail("brush.gif", 128, n=-1) > thumb.write_to_file("x.gif") > ``` > > To make:...

> Hello @zhaohuxing, > > Your libvips is probably too old. Do you know what version you are using? Thanks, but I use version 8.9.2 ``` vips-8.9.2-Tue Apr 21 09:26:11...

> Ooops, sorry, it should be: > > ```python > x = pyvips.Image.thumbnail("3198.gif[n=-1]", 128) > ``` Thanks, BTW, what does `n=-1` mean? I call thumbnail("3198.gif", 128) without `n=-1`, produced gif...

@jcupitt If I did not call thumbnail function, use magick save the picture of gif format, how does resize this picture? In the background, I use bimg library, but it...

@jcupitt Can you provide a complete c program?

> When you load an animated image, pyvips will just give you the first frame. You can select the number of frames to load with `n=` (1 meaning load 1...

Hi, @jcupitt I use vips_thumbnail_buffer with the image of the GIF format, but How to write the processed picture to buffer from c? I tried to use `vips_image_write_to_buffer` and `vips_magicksave_buffer`,...

> You need to give `vips_magicksave_buffer()` the format to encode in, eg.: > > ```c > if (vips_magicksave_buffer (image, > &output_contents, &output_length, > "format", "GIF", > NULL)) > vips_error_exit (NULL);...

Hi @jcupitt, use `vips_image_new_from_buffer` init image in gif format, option_str set `n=-1`?