Commit Graph

24 Commits (4f320e158fc902dedffbb8b5f7ac254944b20068)

Author SHA1 Message Date
Christian Wolf 4f320e158f
Corrected type in phpdoc for psalm
Signed-off-by: Christian Wolf <github@christianwolf.email>
3 years ago
Christian Wolf 9fc057b078 Check if ifile is present and add fallback mechanism
Signed-off-by: Christian Wolf <github@christianwolf.email>
3 years ago
Christian Wolf 7fc3f8ef9f Obtain the correct image type from buffered images
Signed-off-by: Christian Wolf <github@christianwolf.email>
3 years ago
Christoph Wurst 006aac9a0c
Merge pull request #28473 from nextcloud/fix-file-get-contents
Fix path of `file_get_contents`
3 years ago
Daniel Kesselberg 60a7f5c53e
Remove unused method
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
3 years ago
acsfer 280dd851b3
Avoid usage of Nextcloud API, use PHP function 3 years ago
Simon Spannagel 58f55975e0 Fix #20913: Check image resource before attempting to preserve alpha
Signed-off-by: Simon Spannagel <simonspa@kth.se>
3 years ago
acsfer a3c69b8310
Fix path of `file_get_contents`
Try to fix #28370  and #27441 

Avoid pre-pends the `$path` to the user's own storage.
3 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Roeland Jago Douma 6d4afca7ac Add support for webp
Including handling in OC_Image
But also a preview provider

Of course only works if your php actually supports webp

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Roeland Jago Douma adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
Unify links to php.net
3 years ago
Roeland Jago Douma 7f61535a1a
GD images
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
J0WI 68ce17e59b Unify links to php.net
Update all links to https://www.php.net/

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
4 years ago
Morris Jobke 46525f8639
Change 0 to null to properly encode image to BMP if the first pixel is black
Ref #22288

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Morris Jobke 27e7332a9c
Cast float/char to int to avoid invalid scalar argument warning
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Roeland Jago Douma 0c35aaba29
Fix OC_Image new resize functions
Else the wrong mimetype might be set. Resulting in continious
regeneration of previews when browsing.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Christoph Wurst a7c8d26d31
Add visibility to all properties and move static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 1762a409f9
Merge pull request #20422 from nextcloud/techdebt/format-control-structs-classes-methods
Format control structures, classes, methods and function
4 years ago
Roeland Jago Douma eba3726e1e
Merge pull request #19495 from nextcloud/preview-generate-batch
optimize batch generation of previews
4 years ago
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Robin Appelman 7d386872e5
optimize batch generation of previews
by allowing the generation of multiple previews at once we save on having to find, open and decode the max-preview for every preview of the same file

the main use case for this is the preview generator app (pr for that comming next)

in my local testing this saves about 25% of time when using the preview generator app

Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Christoph Wurst 1e086064f5
Move legacy classes from PSR0 to PSR4
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago