Remove checking for ico in similar images (#227)
This commit is contained in:
parent
49ddc041ee
commit
b8049efe62
|
@ -663,7 +663,7 @@ fn load_cache_from_file(text_messages: &mut Messages) -> Option<HashMap<String,
|
||||||
|
|
||||||
fn check_extension_avaibility(file_name_lowercase: &str) -> TypeOfFile {
|
fn check_extension_avaibility(file_name_lowercase: &str) -> TypeOfFile {
|
||||||
// Checking allowed image extensions
|
// Checking allowed image extensions
|
||||||
let allowed_image_extensions = [".jpg", ".jpeg", ".png", ".bmp", ".ico", ".tiff", ".pnm", ".tga", ".ff", ".gif"];
|
let allowed_image_extensions = [".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".pnm", ".tga", ".ff", ".gif"];
|
||||||
let allowed_archive_zip_extensions = [".zip"]; // Probably also should work [".xz", ".bz2"], but from my tests they not working
|
let allowed_archive_zip_extensions = [".zip"]; // Probably also should work [".xz", ".bz2"], but from my tests they not working
|
||||||
let allowed_audio_extensions = [".mp3", ".flac", ".wav", ".ogg"]; // Probably also should work [".xz", ".bz2"], but from my tests they not working
|
let allowed_audio_extensions = [".mp3", ".flac", ".wav", ".ogg"]; // Probably also should work [".xz", ".bz2"], but from my tests they not working
|
||||||
if allowed_image_extensions.iter().any(|e| file_name_lowercase.ends_with(e)) {
|
if allowed_image_extensions.iter().any(|e| file_name_lowercase.ends_with(e)) {
|
||||||
|
|
|
@ -265,8 +265,8 @@ impl SimilarImages {
|
||||||
.to_lowercase();
|
.to_lowercase();
|
||||||
|
|
||||||
// Checking allowed image extensions
|
// Checking allowed image extensions
|
||||||
let allowed_image_extensions = ["jpg", "jpeg", "png", "bmp", "ico", "tiff", "pnm", "tga", "ff", "gif"];
|
let allowed_image_extensions = [".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".pnm", ".tga", ".ff", ".gif"];
|
||||||
if !allowed_image_extensions.iter().any(|e| file_name_lowercase.ends_with(format!(".{}", e).as_str())) {
|
if !allowed_image_extensions.iter().any(|e| file_name_lowercase.ends_with(e)) {
|
||||||
continue 'dir;
|
continue 'dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ Then, for each selected tag by which we want to search for duplicates, we perfor
|
||||||
### Similar Images
|
### Similar Images
|
||||||
It is a tool for finding similar images that differ e.g. in watermark, size etc.
|
It is a tool for finding similar images that differ e.g. in watermark, size etc.
|
||||||
|
|
||||||
The tool first collects images with specific extensions that can be checked - `["jpg", "png", "bmp", "ico", "tiff"]`.
|
The tool first collects images with specific extensions that can be checked - `[".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".pnm", ".tga", ".ff", ".gif"]`.
|
||||||
|
|
||||||
Next cached data are loaded from file to prevent hashing twice same file.
|
Next cached data are loaded from file to prevent hashing twice same file.
|
||||||
Automatically cache which points to non existing data is deleted.
|
Automatically cache which points to non existing data is deleted.
|
||||||
|
|
Loading…
Reference in a new issue