Generates previews
todo |
On OC9, replace \OC\Preview with IPreview if methods we need have been added |
---|---|
package |
OCA\Gallery\Preview |
__construct(\OCP\IConfig $config, \OCP\IPreview $previewManager, \OCP\ILogger $logger)
\OCP\IConfig
\OCP\IPreview
\OCP\ILogger
getPreviewFromCore(boolean $keepAspect) : \OC_Image
todo |
Need to read scaling setting from settings |
---|
boolean
\OC_Image
isMimeSupported(string $mimeType = '*') : boolean
string
boolean
preparePreview(integer $maxWidth, integer $maxHeight, boolean $keepAspect) : \OCA\Gallery\Preview\array<string,string|\OC_Image>|false
We check that the preview returned by the Preview class can be used by the browser. If not, we send "false" to the controller
fixme |
setKeepAspect is missing from public interface. https://github.com/owncloud/core/issues/12772 |
---|
integer
integer
boolean
\OCA\Gallery\Preview\array|false
setupView(string $userId, \OCP\Files\File $file, string $imagePathFromFolder)
fixme |
Private API, but can't use the PreviewManager yet as it's incomplete |
---|---|
string
\OCP\Files\File
string
dataDir : string
var |
---|
string
previewManager : mixed
var |
---|
mixed
logger : \OCP\ILogger
var |
---|
\OCP\ILogger
userId : string
var |
---|
string
preview : \OC\Preview
var |
---|
\OC\Preview
file : \OCP\Files\File
var |
---|
\OCP\Files\File
dims : array<mixed,integer>
var |
---|
array<mixed,integer>