summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview
Commit message (Collapse)AuthorAgeFilesLines
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add preview provider for Krita filesJulius Härtl2020-04-082-4/+54
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Extract preview from opendocument filesJulius Härtl2020-04-081-1/+16
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add abstract class to extract previews from files that are zip archivesJulius Härtl2020-04-081-0/+58
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused importsChristoph Wurst2020-03-252-3/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix mismatching doc block parameter typesChristoph Wurst2020-03-061-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Proper text previewsRoeland Jago Douma2020-01-141-1/+1
| | | | | | | | | | | Fixes #17828 * Modified the preview provider to provider smaller fonts for the previes (so it is not so screaming) * Modified the sidebar to show plain text and markdown files full size. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* Fix license headersChristoph Wurst2020-01-131-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #18536 from nextcloud/enhancement/preview-center-verticallyRoeland Jago Douma2019-12-231-1/+1
|\ | | | | Also center vertically when cropping previews
| * Also center vertically when cropping previewsJohn Molakvoæ (skjnldsv)2019-12-221-1/+1
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Merge pull request #18511 from Al2Klimov/bugfix/movie-getthumbnailRoeland Jago Douma2019-12-221-2/+2
|\ \ | |/ |/| Movie#getThumbnail(): compare Movie#generateThumbNail() to null, not false
| * Movie#getThumbnail(): compare Movie#generateThumbNail() to null, not falseAlexander A. Klimov2019-12-211-2/+2
| | | | | | | | Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
* | Fix Office preview generationRoeland Jago Douma2019-12-181-1/+1
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersChristoph Wurst2019-12-0533-43/+109
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-2219-7/+23
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* #17661Daniel Schneider2019-10-301-1/+1
|
* Explicit cast for ProviderV1AdapterJulius Härtl2019-08-201-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #16307 from ↵Roeland Jago Douma2019-07-091-1/+1
|\ | | | | | | | | nextcloud/bugfix/noid/previewv1adapter-isAvailable Fix ProviderV1Adapter isAvailable wrapper
| * Fix ProviderV1Adapter isAvailable wrapperJulius Härtl2019-07-091-1/+1
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | allow keeping multiple preview "versions" of the same fileRobin Appelman2019-07-081-17/+29
|/ | | | | | | | | | | The main use case here is storage provided versioning where we dont have separate file ids for all the versions, by allowing a prefix for the version we can store separate previews for all the versions. Additionally, by keeping all the version previews in the same folder as the "normal" previews they will be cleaned up properly when the file is deleted Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow IProviderV2 for previews as wellJohn Molakvoæ (skjnldsv)2019-07-051-2/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #16055 from nextcloud/design/native-fontsJan-Christoph Borchardt2019-06-261-1/+1
|\ | | | | Use native font stack
| * Move font from Nunito to Noto SansJan-Christoph Borchardt2019-06-221-1/+1
| | | | | | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* | Add new Provider interface for preview providersRobin Appelman2019-06-1729-133/+280
|/ | | | | | | | | the main difference is passing the `File` object to the provider instead of a `View` + path Old providers will still continue to work as before Signed-off-by: Robin Appelman <robin@icewind.nl>
* Reduce text size of text file preview, fix #13720Jan-Christoph Borchardt2019-01-231-2/+3
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Only generate previews in powers of 4 and set minRoeland Jago Douma2018-10-311-7/+11
| | | | | | | | | | | | | | | Before we'd round up all preview request to their nearest power of two. This resulted still in a lot of possible images. Generating a lot of server load and taking up a lot of space. This moves it to previews to be powers of 4: 64, 256, 1024 and 4096 Also the first two powers are always skipped (4, 16) as it doesn't make sense to generate previews for that. We cache preview pretty agressively and I feel this is a better tradeoff. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use correct typeface for txt previewsJan-Christoph Borchardt2018-10-231-1/+1
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Allow the creationg of previews of files stored in appdataRoeland Jago Douma2018-10-081-11/+8
| | | | | | | To allow us to create previews of files stored in appdata we need to construct the view differently. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* FixesRoeland Jago Douma2018-08-241-5/+8
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* HEIC previews as JPG rather than PNGs to save space.Sebastian Steinmetz2018-08-241-2/+99
| | | Signed-off-by: Sebastian Steinmetz <me@sebastiansteinmetz.ch>
* Merge pull request #10526 from steiny2k/HEICHEIFMorris Jobke2018-08-221-0/+40
|\ | | | | Support HEIC for previews
| * Address comments from @rullzer:Sebastian Steinmetz2018-08-171-0/+8
| | | | | | | | | | | | | | - implement isAvailable - run tests only if ImageMagick with HEIC support is available in the environment Signed-off-by: Sebastian Steinmetz <me@sebastiansteinmetz.ch>
| * Develop HEIC/HEIF preview support #7406Sebastian Steinmetz2018-08-111-0/+32
| | | | | | Signed-off-by: Sebastian Steinmetz <me@sebastiansteinmetz.ch>
* | Check if a preview provider is available before using itRoeland Jago Douma2018-08-171-0/+4
|/ | | | | | | | Else if a preview provider is registerd but not available (for example missing support in some external lib). It will do :boom:. This way the providers can at least do the sanity checks required. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* No need to convert to PDF with LibreOffice, just convert to PNGTor Lillqvist2018-07-121-9/+9
| | | | | | | | | Exporting all pages of a document to a PDF is a waste of time. All we need is a thumbnail of the first page anyway. Plus, reading that PDF (even just the first page of it) into imagick is presumably much slower than reading a simple PNG. Signed-off-by: Tor Lillqvist <tml@collabora.com>
* Log path of file that failed to be parsedMorris Jobke2018-06-281-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Make sure the file is readable before attempting to create a previewRoeland Jago Douma2018-05-301-0/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Delete the previews when a version is restoredRoeland Jago Douma2018-05-142-0/+12
| | | | | | | | | Fixes #9469 When a version of a file is restored the previews are no longer valid. Thus we should remove them so they are regenerated. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move to joinRoeland Jago Douma2018-05-141-8/+8
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Kill the dete preview watcherRoeland Jago Douma2018-05-142-51/+4
| | | | | | | | | | | | | | This code had the potential to time out. If a huge folder with pictures for example was deleted then this could easily grow the number of files to clean with a factor 5 (or more). Now the previews just get cleaned up in the background. Which is good enough for the 99% case As a bonus this now also keeps the previews when in the trashbin so you don't have a spiking server load when a user opens the trashbin view. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add backgroundcleanup jobRoeland Jago Douma2018-05-141-0/+91
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* move log constants to ILoggerArthur Schiwon2018-04-263-3/+8
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly log the full exception instead of only the messageMorris Jobke2018-01-233-3/+13
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* If the preview is size 0 it is invalidRoeland Jago Douma2018-01-221-3/+13
| | | | | | | | | * delete it * throw a NotFound Exception - This should a proper 404 to the user - Next time it is then regenerated Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Improve OC_Image code to not guess the type of input, but actually request ↵Morris Jobke2018-01-181-2/+3
| | | | | | | | the specific methods to be called Followup to #7836 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix float/integer handling in image APIMorris Jobke2018-01-172-4/+6
| | | | | | | * IImage::crop/preciseResize now have type hinting for integers * found while testing strict typing for PHP 7+ Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #7731 from nextcloud/preview_size_incJan-Christoph Borchardt2018-01-091-2/+2
|\ | | | | Max preview size to 4096x4096
| * Max preview size to 4096x4096Roeland Jago Douma2018-01-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | With HiDPI screens. And even normal HD screens you want more detail from your pictures. Or the ability to somewhat zoom on you previews. For this we need somewhat larger previews. Moving the default to 4096x4096 is a step up. Users that want the old behavior can still set the values in config.php Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>