mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
PHRAS-987 1h
PNG-Subdefs (port from 3.8)
This commit is contained in:

committed by
Benoît Burnichon

parent
0109c6c0d2
commit
b6cc58a68e
@@ -151,7 +151,7 @@ class FilesystemService
|
||||
{
|
||||
switch ($spec->getType()) {
|
||||
case SpecificationInterface::TYPE_IMAGE:
|
||||
return 'jpg';
|
||||
return $this->getExtensionFromImageCodec($spec->getImageCodec());
|
||||
case SpecificationInterface::TYPE_ANIMATION:
|
||||
return 'gif';
|
||||
case SpecificationInterface::TYPE_AUDIO:
|
||||
@@ -186,6 +186,27 @@ class FilesystemService
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the extension from imageCodec
|
||||
*
|
||||
* @param string $imageCodec
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getExtensionFromImageCodec($imageCodec)
|
||||
{
|
||||
switch ($imageCodec) {
|
||||
case 'tiff':
|
||||
return 'tif';
|
||||
case 'jpeg':
|
||||
return 'jpg';
|
||||
case 'png':
|
||||
return 'png';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the extension from videocodec
|
||||
*
|
||||
|
Reference in New Issue
Block a user