-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Add AVIF Thumbnail Generation #40048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 10 commits
3ca2e2d
e4f0d9c
4068ca3
af2f4f6
ddab01c
aa3fb33
497a641
55d6973
59bb879
276d473
0710c14
c622c48
e8b23b5
45b5596
b5fa45a
bf0aa68
e5ac220
cd78b74
c5a560e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl> | ||
| * | ||
| * @author Roeland Jago Douma <roeland@famdouma.nl> | ||
| * | ||
| * @license GNU AGPL version 3 or any later version | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as | ||
| * published by the Free Software Foundation, either version 3 of the | ||
| * License, or (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| * | ||
| */ | ||
| namespace OC\Preview; | ||
|
|
||
| use OCP\Files\FileInfo; | ||
|
|
||
| class AVIF extends Image { | ||
| /** | ||
| * {@inheritDoc} | ||
| */ | ||
| public function getMimeType(): string { | ||
| return '/image\/avif/'; | ||
| } | ||
|
|
||
| public function isAvailable(FileInfo $file): bool { | ||
| return (bool)(imagetypes() & IMG_AVIF); | ||
Check failureCode scanning / Psalm UndefinedConstant
Const IMG_AVIF is not defined
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could add IMG_AVIF using |
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The files appear to be identical, so I'm not sure why Git is detecting a difference here.
Possibly a line ending or whitespace difference?
My branch version:
JanisPlayer-patch-1
Master branch version:
master
Nextcloud upstream reference:
Nextcloud @ 345167f