mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-17 08:09:52 +00:00
db: support other image formats supported by imagesize
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a69646b72b8bc223fe9729be3dbefbae2b353
This commit is contained in:
parent
7c26947437
commit
47fd5e4964
1 changed files with 15 additions and 0 deletions
|
|
@ -430,6 +430,21 @@ pub fn detect_mime(data: &[u8]) -> Option<String> {
|
||||||
ImageType::Bmp => "image/bmp",
|
ImageType::Bmp => "image/bmp",
|
||||||
ImageType::Tiff => "image/tiff",
|
ImageType::Tiff => "image/tiff",
|
||||||
ImageType::Webp => "image/webp",
|
ImageType::Webp => "image/webp",
|
||||||
|
ImageType::Aseprite => "image/x-aseprite",
|
||||||
|
ImageType::Dds => "image/vnd.ms-dds",
|
||||||
|
ImageType::Exr => "image/aces",
|
||||||
|
ImageType::Farbfeld => "image/farbfeld",
|
||||||
|
ImageType::Hdr => "image/vnd.radiance",
|
||||||
|
ImageType::Ico => "image/x-icon",
|
||||||
|
ImageType::Ilbm => "image/ilbm",
|
||||||
|
ImageType::Jxl => "image/jxl",
|
||||||
|
ImageType::Ktx2 => "image/ktx2",
|
||||||
|
ImageType::Pnm => "image/x-portable-anymap",
|
||||||
|
ImageType::Psd => "image/vnd.adobe.photoshop",
|
||||||
|
ImageType::Qoi => "image/qoi",
|
||||||
|
ImageType::Tga => "image/x-tga",
|
||||||
|
ImageType::Vtf => "image/x-vtf",
|
||||||
|
ImageType::Heif(_) => "image/heif",
|
||||||
_ => "application/octet-stream",
|
_ => "application/octet-stream",
|
||||||
}
|
}
|
||||||
.to_string(),
|
.to_string(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue