opencloud
opencloud copied to clipboard
Thumbnails: Migrate from govips to vipsgen
Description
Migrate the thumbnails service from the govips to the vipsgen binding. This is recommended by govips and enables the creation of additional file types.
It is markes as WIP for multiple reasons
- to fix #1280 an the loading function is given
failOnError: false, which might impact security. - The used pregenerated bindings are only working for libvips 8.17.x. Distributing in this way will lead to version compatibility issues. A step before compiling to generate the bindings would be the way to go. I don't know how this is handled here.
- Formats like HEIC/HEIF have licencing issues.
- RAW files like .cr2 still needs a workaround (libvips >8.18 and the hack in preprocessor_vips.go:Convert
Related Issue
- https://github.com/opencloud-eu/opencloud/issues/1280
- https://github.com/opencloud-eu/opencloud/issues/630
- https://github.com/opencloud-eu/opencloud/issues/639
- (indirect) https://github.com/opencloud-eu/opencloud/issues/1128
Motivation and Context
- govips suggests to migrate to vipsgen
- govips handles mime-types in the binding, vipsgen passes them on to libvips. So all formats supported from libvips can be used.
How Has This Been Tested?
This PR is WIP. It was only tested manually with different image files
Screenshots (if appropriate):
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Technical debt
- [ ] Tests only (no source changes)
Checklist:
- [ ] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation added