summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhspetersson <jhspetersson@gmail.com>2023-05-11 14:10:15 +0200
committerjhspetersson <jhspetersson@gmail.com>2023-05-11 14:10:15 +0200
commit17aa71cbb35cc61ef1fc92483018972445ac1b5e (patch)
tree95d91612f01172d7f76562554835d801756dbf54
parentc2190fd25c2a6af2c9915daf06631100069ab0c3 (diff)
support .TGA as image format
-rw-r--r--docs/usage.md2
-rw-r--r--src/config.rs2
-rw-r--r--src/util/dimensions/image.rs3
3 files changed, 4 insertions, 3 deletions
diff --git a/docs/usage.md b/docs/usage.md
index a33be33..4bb1443 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -373,7 +373,7 @@ The lists below could be edited with the configuration file.
| `is_audio` | .aac, .aiff, .amr, .flac, .gsm, .m4a, .m4b, .m4p, .mp3, .ogg, .wav, .wma |
| `is_book` | .azw3, .chm, .djvu, .epub, .fb2, .mobi, .pdf |
| `is_doc` | .accdb, .doc, .docm, .docx, .dot, .dotm, .dotx, .mdb, .odp, .ods, .odt, .pdf, .potm, .potx, .ppt, .pptm, .pptx, .rtf, .xlm, .xls, .xlsm, .xlsx, .xlt, .xltm, .xltx, .xps |
-| `is_image` | .bmp, .exr, .gif, .heic, .jpeg, .jpg, .jxl, .png, .svg, .tiff, .webp |
+| `is_image` | .bmp, .exr, .gif, .heic, .jpeg, .jpg, .jxl, .png, .svg, .tga, .tiff, .webp |
| `is_source` | .asm, .bas, .c, .cc, .ceylon, .clj, .coffee, .cpp, .cs, .d, .dart, .elm, .erl, .go, .groovy, .h, .hh, .hpp, .java, .jl, .js, .jsp, .jsx, .kt, .kts, .lua, .nim, .pas, .php, .pl, .pm, .py, .rb, .rs, .scala, .sol, .swift, .tcl, .ts, .vala, .vb, .zig |
| `is_video` | .3gp, .avi, .flv, .m4p, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .webm, .wmv |
diff --git a/src/config.rs b/src/config.rs
index 086ce46..bcb24bd 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -138,7 +138,7 @@ impl Config {
is_audio : vec![String::from(".aac"), String::from(".aiff"), String::from(".amr"), String::from(".flac"), String::from(".gsm"), String::from(".m4a"), String::from(".m4b"), String::from(".m4p"), String::from(".mp3"), String::from(".ogg"), String::from(".wav"), String::from(".wma")],
is_book : vec![String::from(".azw3"), String::from(".chm"), String::from(".djvu"), String::from(".epub"), String::from(".fb2"), String::from(".mobi"), String::from(".pdf")],
is_doc : vec![String::from(".accdb"), String::from(".doc"), String::from(".docm"), String::from(".docx"), String::from(".dot"), String::from(".dotm"), String::from(".dotx"), String::from(".mdb"), String::from(".odp"), String::from(".ods"), String::from(".odt"), String::from(".pdf"), String::from(".potm"), String::from(".potx"), String::from(".ppt"), String::from(".pptm"), String::from(".pptx"), String::from(".rtf"), String::from(".xlm"), String::from(".xls"), String::from(".xlsm"), String::from(".xlsx"), String::from(".xlt"), String::from(".xltm"), String::from(".xltx"), String::from(".xps")],
- is_image : vec![String::from(".bmp"), String::from(".exr"), String::from(".gif"), String::from(".heic"), String::from(".jpeg"), String::from(".jpg"), String::from(".jxl"), String::from(".png"), String::from(".psb"), String::from(".psd"), String::from(".svg"), String::from(".tiff"), String::from(".webp")],
+ is_image : vec![String::from(".bmp"), String::from(".exr"), String::from(".gif"), String::from(".heic"), String::from(".jpeg"), String::from(".jpg"), String::from(".jxl"), String::from(".png"), String::from(".psb"), String::from(".psd"), String::from(".svg"), String::from(".tga"), String::from(".tiff"), String::from(".webp")],
is_source : vec![String::from(".asm"), String::from(".bas"), String::from(".c"), String::from(".cc"), String::from(".ceylon"), String::from(".clj"), String::from(".coffee"), String::from(".cpp"), String::from(".cs"), String::from(".d"), String::from(".dart"), String::from(".elm"), String::from(".erl"), String::from(".go"), String::from(".groovy"), String::from(".h"), String::from(".hh"), String::from(".hpp"), String::from(".java"), String::from(".jl"), String::from(".js"), String::from(".jsp"), String::from(".jsx"), String::from(".kt"), String::from(".kts"), String::from(".lua"), String::from(".nim"), String::from(".pas"), String::from(".php"), String::from(".pl"), String::from(".pm"), String::from(".py"), String::from(".rb"), String::from(".rs"), String::from(".scala"), String::from(".sol"), String::from(".swift"), String::from(".tcl"), String::from(".ts"), String::from(".vala"), String::from(".vb"), String::from(".zig")],
is_video : vec![String::from(".3gp"), String::from(".avi"), String::from(".flv"), String::from(".m4p"), String::from(".m4v"), String::from(".mkv"), String::from(".mov"), String::from(".mp4"), String::from(".mpeg"), String::from(".mpg"), String::from(".webm"), String::from(".wmv")],
default_file_size_format : Some(String::new()),
diff --git a/src/util/dimensions/image.rs b/src/util/dimensions/image.rs
index e024274..b8d13cf 100644
--- a/src/util/dimensions/image.rs
+++ b/src/util/dimensions/image.rs
@@ -7,7 +7,7 @@ use std::path::Path;
pub struct ImageDimensionsExtractor;
impl ImageDimensionsExtractor {
- const EXTENSIONS: [&'static str; 12] = [
+ const EXTENSIONS: [&'static str; 13] = [
"bmp",
"gif",
"heic",
@@ -18,6 +18,7 @@ impl ImageDimensionsExtractor {
"png",
"psb",
"psd",
+ "tga",
"tiff",
"webp"
];