From eb7168ddb57ca02d5e214c12e9410f584d139060 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 16 Oct 2024 12:05:40 +0200 Subject: [PATCH] Changelog entry and Readme updates related to libvips --- changelog/unreleased/thumbnails-libvips.md | 8 +++++++ services/thumbnails/README.md | 26 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 changelog/unreleased/thumbnails-libvips.md diff --git a/changelog/unreleased/thumbnails-libvips.md b/changelog/unreleased/thumbnails-libvips.md new file mode 100644 index 000000000..43cec8c8b --- /dev/null +++ b/changelog/unreleased/thumbnails-libvips.md @@ -0,0 +1,8 @@ +Enhancement: Allow to use libvips for generating thumbnails + +To improve performance (and to be able to support a wider range of images formats in the future) +the thumbnails service is now able to utilize libvips (https://www.libvips.org/) for generating thumbnails. +Enabling the use of libvips is implemented as a build-time option which is currently disabled for the +"bare-metal" build of the ocis binary and enabled for the docker image builds. + +https://github.com/owncloud/ocis/pull/10310 diff --git a/services/thumbnails/README.md b/services/thumbnails/README.md index d18177756..78cbea827 100644 --- a/services/thumbnails/README.md +++ b/services/thumbnails/README.md @@ -89,3 +89,29 @@ To have more control over memory (and CPU) consumption the maximum number of con ## Thumbnails and SecureView If a resource is shared using SecureView, the share reciever will get a 403 (forbidden) response when requesting a thumbnail. The requesting client needs to decide what to show and usually a placeholder thumbnail is used. + +## Using libvips for thumbnail generation + +To improve performance (and to support a wider range of images formats) the thumbnails service is able to utilize libvips (https://www.libvips.org/) for thumbnail generation. Support for libvips needs to be +enabled at buildtime and has a couple of implications: + +* With libvips support enabled it is not possible to create a statically linked ocis binary +* So the libvips shared libraries need to be available at runtime in the same release that was used to build the ocis binary +* When using the ocis docker images the libvips shared libraries are included in the image + +Support of libvips is disabled by default. To enable it make sure libvips and its buildtime dependencies are install in your build environment. Then just set +the `ENABLE_VIPS` variable on the `make` command: + +```shell +make -C ocis build ENABLE_VIPS=1 +``` + +Or include the `enable_vips` build tag in the `go build` command: + +```shell +go build -tags enable_vips -o ocis -o bin/ocis ./cmd/ocis +``` + +When building a docker image using the Dockerfile in the top-level directory of ocis, libvips support is enabled and the libvips shared libraries are included +in the resulting docker image. +