summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview
Commit message (Collapse)AuthorAgeFilesLines
* log imaginary errors as info to not spam the server logsSimon L2023-08-101-2/+2
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* fix: catch errors in id3parser libraryDaniel Kesselberg2023-05-301-2/+13
| | | | | | | | We use a forked version of getID3 to read embedded images from mp3 files to use them as previews. If the library is unable to extract a image or fails on something different we should handle it properly. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge pull request #36692 from ↵Simon L2023-05-171-0/+4
|\ | | | | | | | | nextcloud/throw-exception-to-avoid-division-by-zero fix(preview-generator): Throw exception before dividing by zero when generating previews
| * fix(preview-generator): Throw exception before dividing by zero when ↵Thomas Citharel2023-02-131-0/+4
| | | | | | | | | | | | | | | | | | generating previews If the maximum preview generated gives some kind of invalid IImage, it's dimentions and filename can be set to zero. And then later we do a division by zero to keep the aspect ratio of the previews. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* | Fix typos in lib/public subdirectorySimon L2023-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/public` Signed-off-by: luz paz <luzpaz@github.com> Update lib/public/Accounts/IAccount.php Signed-off-by: luz paz <luzpaz@github.com> Signed-off-by: Simon L <szaimen@e.mail.de> Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
* | Merge pull request #37148 from nextcloud/enh/noid/increase-imaginary-timeoutsSimon L2023-05-041-0/+2
|\ \ | | | | | | increase imaginary timeouts as for big files the processing could take very long
| * | increase imaginary timeouts as for big files the processing could take very longSimon L2023-03-091-0/+2
| | | | | | | | | | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* | | Merge branch 'master' into enh/type-iconfig-getter-callsCôme Chilliet2023-04-202-93/+51
|\ \ \ | | | | | | | | Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
| * \ \ Merge pull request #37772 from nextcloud/enh/30986/follow-upSimon L2023-04-181-0/+4
| |\ \ \ | | | | | | | | | | Prevent the OpenDocument preview generator from trying to open empty files
| | * | | fix php-lintSimon L2023-04-171-1/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Simon L <szaimen@e.mail.de>
| | * | | Update lib/private/Preview/Bundled.phpClaus-Justus Heine2023-04-171-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Carl Schwan <carl@carlschwan.eu>
| | * | | Prevent the OpenDocument preview generator from trying to open empty files.Claus-Justus Heine2023-04-171-0/+5
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Rationale: does not make sense, and triggers a deprecation error in \ZipArchive. Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
| * | | try to make linters happyGlandos2023-04-171-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | gather code from small and max previewGlandos2023-04-171-90/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use directory listing in both functions to gain 25% speed on run where every preview already exist. Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | Revert 0e49b40Glandos2023-04-171-3/+0
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | improve parameter docGlandos2023-04-171-1/+1
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | Ensure max preview image is not nullGlandos2023-04-171-0/+3
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | php-cs-fixGlandos2023-04-171-1/+1
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | List preview directory only onceGlandos2023-04-171-5/+13
| |/ / | | | | | | | | | | | | | | | getCachedPreview used to call `getFile`, and this calls `getDirectoryListing` (or underlying function that list directory) to find the file. This was done for every preview spec. Now, this is done only once at the beginning of the loop, and the array is just iterated when needed to find the correct entry. Signed-off-by: Glandos <bugs-github@antipoul.fr>
* / / Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-2/+2
|/ / | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | imaginary - fix autorotate and improve the logicSimon L2023-03-091-33/+32
| | | | | | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* | fix indent 2Glandos2023-02-161-7/+7
| | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
* | fix indentGlandos2023-02-151-8/+8
| | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
* | Use proc_open to avoid spawning a shellGlandos2023-02-151-10/+17
| | | | | | | | | | | | The use of `exec` will spawn a shell, using `/bin/sh` on POSIX platforms. But in restricted environment, such as AppArmor, this means giving execution to `/bin/sh`, which renders the execution restriction quite useless. Using an array with `proc_open` reduces this, and paved the way for file streaming instead of temporary file. Signed-off-by: Glandos <bugs-github@antipoul.fr>
* | cache formats supported by imagickRobin Appelman2023-02-131-0/+40
|/ | | | | | turns out this can be quite slow Signed-off-by: Robin Appelman <robin@icewind.nl>
* imaginary - allow to generate heif, pdf and svg thumbnailsSimon L2023-02-081-18/+45
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* imaginary - add tiff to supported formatsSimon L2023-01-251-1/+1
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* composer run cs:fixCôme Chilliet2023-01-206-6/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* docs: add description how BackgroundCleanupJob.getNewPreviewLocations worksDaniel Kesselberg2023-01-031-0/+15
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix psalm spotted errors with new requirementsCôme Chilliet2023-01-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* preview: fix HEIC orientationVarun Patil2022-12-081-0/+3
| | | | Signed-off-by: Varun Patil <varunpatil@ucla.edu>
* Use TimedJob from OCP instead of OCCôme Chilliet2022-12-051-3/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* preview: respect quality in ImaginaryVarun Patil2022-12-031-0/+3
| | | | Signed-off-by: Varun Patil <varunpatil@ucla.edu>
* Fix distorted previews when using imaginaryRichard Steinmetz2022-11-111-4/+14
| | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* Limit-number-of-concurrent-preview-generationsszaimen2022-11-051-20/+125
| | | | | Signed-off-by: Bowen Ding <dbw9580@live.com> Signed-off-by: szaimen <szaimen@e.mail.de>
* Emit typed event when preview is requestedJulius Härtl2022-10-271-9/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Save getting the parent node when generating the previewJulius Härtl2022-08-241-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Use Image class from public APIChristopher Ng2022-06-0211-11/+11
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Merge pull request #32410 from nextcloud/bugfix/noid/imaginary-exceptionJohn Molakvoæ2022-05-201-2/+7
|\
| * Add explicit return if getSmallImagePreview failsJulius Härtl2022-05-191-2/+7
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Fix crop conditionCarl Schwan2022-05-191-4/+11
| | | | | | | | | | | | | | | | Make sure that when fetching the image from the cache we don't accidentally fetch the cropped image just because it also start with 256-256 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Fix cropped image generated when not askedCarl Schwan2022-05-171-1/+2
|/ | | | | | | The $crop parameter was not propagated to the imaginary pipeline and instead it used the smartcrop algorithm always Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #32315 from ↵John Molakvoæ2022-05-101-2/+10
|\ | | | | | | nextcloud/fix/noid/preview-duplicate-folder-creation
| * Fix preview generator trying to recreate an existing folderRichard Steinmetz2022-05-091-2/+10
| | | | | | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* | Set loglevel for IMagick Thumbnail error to infoAlexander F2022-05-091-1/+1
|/ | | | | | Issue #32263 Signed-off-by: Alexander Fleischer <Alexander.Fleischer@tu-ilmenau.de>
* Migrate more classes of lib/private to LoggerInterfaceCôme Chilliet2022-04-262-6/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Generate small preview straight away if Imaginary is enabledJohn Molakvoæ2022-04-061-2/+7
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Fix imaginary with rotated exif imagesCarl Schwan2022-04-041-8/+16
| | | | | | | | | | | | | Now do the operation in two steps: 1. Rotate the image according the exif data 2. Do the actual operation This should only have a performance impact on image with exif rotation data to do the rotation. For all the other images the autorotate steps should be almost instant. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #24166 from nextcloud/imaginary-prototypeCarl Schwan2022-03-183-3/+222
|\ | | | | Send images to Imaginary docker to generate previews
| * Send images to imaginary docker to generate previewsVincent Petry2022-03-173-3/+222
| | | | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu> Co-Authored-by: Vincent Petry <vincent@nextcloud.com>