Added TGA support to transcoder

This commit is contained in:
Matthew Barbour 2021-01-16 14:18:11 -06:00
parent 4f82dce662
commit 6489b388a0
5 changed files with 11 additions and 1 deletions

View file

@ -47,6 +47,7 @@ abstract class MediaEngine
MimeType::GIF,
MimeType::JPEG,
MimeType::PNG,
MimeType::TGA,
MimeType::WEBP,
MimeType::WEBP_LOSSLESS,
],
@ -57,6 +58,7 @@ abstract class MediaEngine
MimeType::PNG,
MimeType::PPM,
MimeType::PSD,
MimeType::TGA,
MimeType::TIFF,
MimeType::WEBP,
MimeType::WEBP_LOSSLESS,

View file

@ -51,6 +51,7 @@ class FileExtension
public const RSS = 'rss';
public const SVG = 'svg';
public const TAR = 'tar';
public const TGA = 'tga';
public const TEXT = 'txt';
public const TIFF = 'tiff';
public const TIF = 'tif';

View file

@ -184,6 +184,11 @@ class MimeMap
self::MAP_EXT => [FileExtension::TAR],
self::MAP_MIME => [MimeType::TAR],
],
MimeType::TGA => [
self::MAP_NAME => "TGA",
self::MAP_EXT => [FileExtension::TGA],
self::MAP_MIME => [MimeType::TGA, 'image/x-targa'],
],
MimeType::TEXT => [
self::MAP_NAME => "Text",
self::MAP_EXT => [FileExtension::TEXT, FileExtension::ASC],

View file

@ -44,6 +44,7 @@ class MimeType
public const RSS = 'application/rss+xml';
public const SVG = 'image/svg+xml';
public const TAR = 'application/x-tar';
public const TGA = 'image/x-tga';
public const TEXT = 'text/plain';
public const TIFF = 'image/tiff';
public const WAV = 'audio/x-wav';

View file

@ -25,7 +25,8 @@ class TranscodeImage extends Extension
"PPM" => MimeType::PPM,
"PSD" => MimeType::PSD,
"TIFF" => MimeType::TIFF,
"WEBP" => MimeType::WEBP
"WEBP" => MimeType::WEBP,
"TGA" => MimeType::TGA
];
const OUTPUT_MIMES = [