constants.js 480 B

1234567891011121314
  1. /*
  2. Photo Module Constants
  3. Shared constants across all Photo module scripts
  4. */
  5. // RAW image format extensions supported by the Photo module
  6. // Must match backend RawImageFormats in src/mod/filesystem/metadata/metadata.go
  7. const RAW_IMAGE_EXTENSIONS = ['arw', 'cr2', 'dng', 'nef', 'raf', 'orf'];
  8. // Check if a file is a RAW image format
  9. function isRawImage(filename) {
  10. var ext = filename.split('.').pop().toLowerCase();
  11. return RAW_IMAGE_EXTENSIONS.includes(ext);
  12. }