Skip to content

Thumbnails: Migrate from govips to vipsgen#1338

Closed
heijligen wants to merge 4 commits intoopencloud-eu:mainfrom
heijligen:thumbnail
Closed

Thumbnails: Migrate from govips to vipsgen#1338
heijligen wants to merge 4 commits intoopencloud-eu:mainfrom
heijligen:thumbnail

Conversation

@heijligen
Copy link
Copy Markdown

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

  1. to fix Thumbnail generation fails: ipsJpeg: Invalid SOS parameters for sequential JPEG #1280 an the loading function is given failOnError: false, which might impact security.
  2. 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.
  3. Formats like HEIC/HEIF have licencing issues.
  4. RAW files like .cr2 still needs a workaround (libvips >8.18 and the hack in preprocessor_vips.go:Convert

Related Issue

Motivation and Context

  1. govips suggests to migrate to vipsgen
  2. 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

Follow the README [1] of govips and migrate to vipsgen

This is a 1:1 port which uses the pregenerated bindings.
This works only with libvips 8.17

[1] https://github.com/davidbyttow/govips?tab=readme-ov-file#project-status--future-of-govips
A vips source is based on a ReadCloser. And the reva cs3 api provides this
datatype
This allows the thumbnail generation for images with invalid SOS parameters
@dragonchaser
Copy link
Copy Markdown
Member

@heijligen are you still working on this?

@rhafer
Copy link
Copy Markdown
Member

rhafer commented Mar 3, 2026

This is recommended by govips and enables the creation of additional file types.

Seems that govips removed that recommendation again and switched to its own implementation of automatically generated bindings. Let's close this PR for now and see how this develops upstream ...

@rhafer rhafer closed this Mar 3, 2026
@github-project-automation github-project-automation bot moved this from Qualification to Done in OpenCloud Team Board Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Thumbnail generation fails: ipsJpeg: Invalid SOS parameters for sequential JPEG

4 participants