File tree Expand file tree Collapse file tree
wcfsetup/install/files/lib/system/image/cover/photo Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace wcf \system \image \cover \photo ;
44
5+ use wcf \system \file \processor \ImageData ;
56use wcf \system \style \StyleHandler ;
67use wcf \util \FileUtil ;
78
@@ -81,4 +82,10 @@ public static function getDefaultCoverPhoto(): self
8182
8283 return self ::$ defaultCoverPhoto ;
8384 }
85+
86+ #[\Override]
87+ public function getImageData (?int $ minWidth = null , ?int $ minHeight = null ): ?ImageData
88+ {
89+ return null ;
90+ }
8491}
Original file line number Diff line number Diff line change 33namespace wcf \system \image \cover \photo ;
44
55use wcf \data \file \File ;
6+ use wcf \system \file \processor \ImageData ;
67
78/**
89 * Represents a cover photo that is based on a file upload.
@@ -81,4 +82,10 @@ public function getMimeType(?string $size = null): string
8182
8283 return $ this ->file ->mimeType ;
8384 }
85+
86+ #[\Override]
87+ public function getImageData (?int $ minWidth = null , ?int $ minHeight = null ): ?ImageData
88+ {
89+ return $ this ->file ->getImageData ($ minWidth , $ minHeight );
90+ }
8491}
Original file line number Diff line number Diff line change 22
33namespace wcf \system \image \cover \photo ;
44
5+ use wcf \system \file \processor \ImageData ;
6+
57/**
68 * Default interface for cover photos that support mulitple sizes.
79 *
@@ -21,4 +23,6 @@ public function getHeight(?string $size = null): int;
2123 public function getFileSize (?string $ size = null ): int ;
2224
2325 public function getMimeType (?string $ size = null ): string ;
26+
27+ public function getImageData (?int $ minWidth = null , ?int $ minHeight = null ): ?ImageData ;
2428}
You can’t perform that action at this time.
0 commit comments