Commit Graph
32 Commits
Author SHA1 Message Date
Dominik Schmidt 47a7136c46 feat(thumbnails): support BigTIFF containers for raw previews (DNG 1.7) 2026-08-19 07:30:53 +02:00
Dominik Schmidt 6ade518690 test(thumbnails): expand raw preview coverage and quiet previewless logging
Add big-endian, largest-candidate, orientation-direction, isRenderableJPEG
classification and maxPreviewLength tests plus a ForType raw-dispatch check;
log a raw file without an embedded preview at debug instead of error; name the
TIFF magic constant and de-enumerate the decoder doc comment.
2026-08-18 16:48:32 +02:00
Dominik Schmidt 8dec34dbd4 fix(thumbnails): cap the served raw preview length
Reject a preview whose declared length exceeds 100MB rather than serving it;
previews are camera-generated JPEGs, so this bounds the output independently
of the input file size.
2026-08-18 16:48:32 +02:00
Dominik Schmidt f112e8bfb2 feat(thumbnails): register Nikon NRW and Sony SRF raw previews
Both are TIFF-based camera raw formats handled by the same generic walker;
NRW detection needs the reva mimetype mapping in opencloud-eu/reva#773, SRF is
already mapped. No sample files on hand for these two, added by format
structure alongside their verified siblings.
2026-08-18 16:48:32 +02:00
Dominik Schmidt 61ce147205 fix(thumbnails): harden the raw tiff walker against crafted files
Cap the IFD queue at maxIFDs so a file packed with huge SubIFD counts can no
longer grow it without bound, and walk the embedded JPEG by a bounded number
of header segments so a preview whose SOF sits past 64KB of leading metadata
is still found instead of being scanned only within a fixed byte window.
2026-08-18 16:48:32 +02:00
Dominik Schmidt b02d4fb279 chore(thumbnails): gofmt 2026-08-18 16:48:32 +02:00
Dominik Schmidt 9805f65136 chore(thumbnails): tighten rawtiff comments 2026-08-18 16:48:32 +02:00
Dominik Schmidt 5b26d202b5 feat(thumbnails): serve raw previews for CR2, PEF, ARW, SR2 and DNG
Rename RawImageDecoder to RawTiffDecoder and qualify candidates by their
actual stream instead of trusting the tags: CR2 keeps its full-size JPEG
as an IFD0 strip, DNG stores the raw sensor payload as lossless JPEG
(SOF3) which starts with a regular SOI. A JPEG segment walk to the SOF
marker accepts only the DCT processes common decoders render.
2026-08-18 16:48:32 +02:00
Dominik Schmidt c0069c9e77 feat(thumbnails): serve the embedded jpeg preview of nikon raw files 2026-08-18 16:48:31 +02:00
Florian Schade 288e67cc39 chore: replace interface with any 2026-04-23 09:31:11 +02:00
Florian Schade 9c651af32d fix(thumbnailer): missing font panic 2025-12-31 12:17:11 +01:00
Florian Schade 01b768d33c fix(thumbnailer): respect image boundaries and text wrappings for TxtToImageConverter string drawing 2025-12-22 15:57:25 +01:00
Jannik Stehle 64afb387a2 chore: replace branded ggs test files 2025-01-28 09:38:22 +01:00
Jannik Stehle fac4ebbf0f chore: remove or change branded test files in thumbnail service 2025-01-27 15:12:12 +01:00
Jörn Friedrich Dreyer b07b5a1149 use plain pkg module
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:42:19 +01:00
Jörn Friedrich Dreyer 8e028f17e9 change module name
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 09:58:18 +01:00
jkoberg 2b8b853c4d feat(thumbnails): make ggp thumbnails work
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-11-07 17:18:28 +01:00
jkoberg 02196da2e0 feat(thumbnails): allow thumbnails on ggp files
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-11-06 19:32:08 +01:00
Ralf Haferkamp b63676ff93 Fix GeoGebra thumbnails when libvips support is enabled
For GeoGebra files we where still using the imaging package to decode the
embedded png, but handed it of to vips for scaling, which can't work. Now
we use vips for decoding the image as well.
2024-10-17 14:05:27 +02:00
Ralf Haferkamp a9a5570050 feat(thumbnails): optional libvips based thumbnail generation
Can be enabled by setting the 'enable_vips' tag on 'go build'
2024-10-17 14:05:27 +02:00
Ralf Haferkamp 358adc15dc refactor(thumbnails): separate out 'kovidgoyal/imaging' dependencies
Move code using the 'kovidgoyal/imaging' package to separate files
to make it easier to create alternative implementations based on build
tags.
2024-10-17 14:05:27 +02:00
Thomas Müller 9db3fd028e feat: add maximum image dimension to be processed by the thumbnailer (#9035)
* feat: add maximum image dimension to be processed by the thumbnailer

* chore: make golangci-lint happy
2024-05-03 12:20:27 +02:00
Thomas Müller a53a7cf8b5 fix: replace github.com/disintegration/imaging with github.com/kovidgoyal/imaging 2024-04-26 11:36:49 +02:00
Christian Richter ba5a050ab8 incorporate requested changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-28 09:53:23 +01:00
Christian Richter f3ed5ad696 add audio tests
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-27 16:26:02 +01:00
Christian Richter 497ae281ea add tests
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-27 15:31:38 +01:00
Christian RichterandFlorian Schade c9f6b961f9 Add geogebra previews
Co-authored-by: Florian Schade <fschade@owncloud.com>

Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-27 15:31:38 +01:00
Dominik Schmidt a9141146fb Remove LazyReadSeeker 2023-10-30 11:15:20 +01:00
Dominik Schmidt 0b88ef8c95 thumbnails: extract pictures from audio files 2023-10-28 01:16:58 +02:00
case0sh ace3664f6a fix formatting 2023-10-06 10:29:08 +02:00
David Christofas bff9c2b3cd auto orientate pictures for thumbnails 2022-09-05 16:33:29 +02:00
Christian Richter 78064e6bab rename folder extensions -> services
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-06-27 14:05:36 +02:00