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
open preview in the right sidebar request like: remote.php/dav/spaces/spaceId/lorem.txt?scalingup=0&preview=1&a=1&processor=thumbnail&c=c5985ab688cc88362a9cfe7d9d284379&x=1200&y=1200
Expected behavior
user can see UTF characters in the preview. latin and cyrillic work fine
Actual behavior
file is truncated:
I received a file with a size of 640x640, although the request was for 1200x1200.
@ScharfViktor ok, i checked the code, the default text preprocessor uses 640x480 as a default resolution, our default manager uses that img as source and the x & y dimensions from the url, are not meant to be size to expect, instead it is used as a max dimension and we pick the closest match from all available dimensions, this happens here and here.
the available rectangles are:
"16x16"
"32x32"
"64x64"
"128x128"
"1080x1920"
"1920x1080"
"2160x3840"
"3840x2160"
"4320x7680"
"7680x4320"
long story short, the max available dimension for the TxtToImageConverter is 640x480 (the source image) which results in 640x640 because it fits into "1200x1200" and its max available size is 640x640 (no upscaling).
Activity
fschade commentedon Dec 16, 2025
cant reproduce it (cut off), theres no text cut off using my test-instance, can we check it together?
the size is unfortunately hardcoded, i check it right now!
opencloud/services/thumbnails/pkg/preprocessor/preprocessor.go
Line 111 in 3ea736c
fschade commentedon Dec 16, 2025
@ScharfViktor ok, i checked the code, the default text preprocessor uses 640x480 as a default resolution, our default manager uses that img as source and the x & y dimensions from the url, are not meant to be size to expect, instead it is used as a max dimension and we pick the closest match from all available dimensions, this happens here and here.
the available rectangles are:
long story short, the max available dimension for the TxtToImageConverter is
640x480(the source image) which results in640x640because it fits into "1200x1200" and its max available size is640x640(no upscaling).fschade commentedon Dec 16, 2025
update, the cropping does not happen on macos, but in docker it happens... looks like a font rendering // calc issue to me...
opencloud/services/thumbnails/pkg/preprocessor/preprocessor.go
Line 121 in 3ea736c
rhafer commentedon Dec 17, 2025
It's probably a difference between the libvips based thumbnailer and the native go based thumbnailer.
The container builds have libvips enabled. @fschade did you local build also use libvips?
fschade commentedon Dec 17, 2025
@rhafer thanks for the hint, i build it with the enable_vips tag, same on macOS with or without vips, nothing is cut off :(.