mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 20:00:05 +01:00
fallback to jpg when no format detected (#296)
Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
510cf3421a
commit
0c0147354e
13
dist/image-sequencer.js
vendored
13
dist/image-sequencer.js
vendored
@@ -50148,7 +50148,18 @@ module.exports = function GetFormat(src) {
|
||||
|
||||
if (format === "jpeg") format = "jpg";
|
||||
|
||||
return format;
|
||||
function validateFormat(data){
|
||||
let supportedFormats = [
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'png',
|
||||
'gif',
|
||||
'canvas',
|
||||
];
|
||||
return supportedFormats.includes(data);
|
||||
}
|
||||
|
||||
return validateFormat(format)?format:'jpg';
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user