You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is very slow --- it's much better to use thumbnail or thumbnail_buffer, if possible. For example:
$ vipsheader theo.jpg
theo.jpg: 6048x4032 uchar, 3 bands, srgb, jpegload
$ time vips thumbnail theo.jpg x.jpg 256
real 0m0.102s
user 0m0.084s
sys 0m0.034s
$ time vips thumbnail_image theo.jpg x.jpg 256
real 0m1.697s
user 0m3.819s
sys 0m0.109s
So for a 6k x 4k pixel JPEG, thumbnail is around 15x faster.
Combining open and resize in one operation lets libvips exploit a range of tricks with resize options in the load library. You'll get better quality for things like PDF as well.
The text was updated successfully, but these errors were encountered:
Hi, I just stumbled upon this nice project.
I noticed it's using
thumbnail_image
:https://github.com/zRedShift/thumbnailer/blob/master/vips.c#L59
This is very slow --- it's much better to use
thumbnail
orthumbnail_buffer
, if possible. For example:So for a 6k x 4k pixel JPEG,
thumbnail
is around 15x faster.Combining open and resize in one operation lets libvips exploit a range of tricks with resize options in the load library. You'll get better quality for things like PDF as well.
The text was updated successfully, but these errors were encountered: