diff --git a/cocoa/pe/en.lproj/Preferences.strings b/cocoa/pe/en.lproj/Preferences.strings index 810ff6ed..4f2a0996 100644 Binary files a/cocoa/pe/en.lproj/Preferences.strings and b/cocoa/pe/en.lproj/Preferences.strings differ diff --git a/cocoa/pe/en.lproj/Preferences.xib b/cocoa/pe/en.lproj/Preferences.xib index f12620d1..1447fb11 100644 --- a/cocoa/pe/en.lproj/Preferences.xib +++ b/cocoa/pe/en.lproj/Preferences.xib @@ -228,7 +228,7 @@ 67239424 0 - Match scaled pictures together + Match pictures of different dimensions 1211912703 @@ -984,26 +984,6 @@ 98 - - - enabled: values.scanType - - - - - - enabled: values.scanType - enabled - values.scanType - - NSValueTransformerName - vtScanTypeIsFuzzy - - 2 - - - 100 - diff --git a/cocoa/pe/fr.lproj/Preferences.strings b/cocoa/pe/fr.lproj/Preferences.strings index 69f6f88f..5a23a449 100644 --- a/cocoa/pe/fr.lproj/Preferences.strings +++ b/cocoa/pe/fr.lproj/Preferences.strings @@ -29,7 +29,7 @@ /* Class = "NSMenuItem"; title = "Right in destination"; ObjectID = "30"; */ "30.title" = "Directement à la destination"; -/* Class = "NSButtonCell"; title = "Match scaled pictures together"; ObjectID = "31"; */ +/* Class = "NSButtonCell"; title = "Match pictures of different dimensions"; ObjectID = "31"; */ "31.title" = "Comparer les images de tailles différentes"; /* Class = "NSButtonCell"; title = "Automatically check for updates"; ObjectID = "32"; */ diff --git a/cocoa/pe/fr.lproj/Preferences.xib b/cocoa/pe/fr.lproj/Preferences.xib index 57c717f9..c18210c6 100644 --- a/cocoa/pe/fr.lproj/Preferences.xib +++ b/cocoa/pe/fr.lproj/Preferences.xib @@ -209,7 +209,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -236,7 +236,7 @@ 1211912703 2 - + @@ -258,7 +258,7 @@ 1211912703 2 - + @@ -280,7 +280,7 @@ 1211912703 2 - + @@ -479,7 +479,7 @@ 1211912703 2 - + @@ -501,7 +501,7 @@ 1211912703 2 - + @@ -523,7 +523,7 @@ 1211912703 2 - + @@ -992,26 +992,6 @@ 98 - - - enabled: values.scanType - - - - - - enabled: values.scanType - enabled - values.scanType - - NSValueTransformerName - vtScanTypeIsFuzzy - - 2 - - - 100 - diff --git a/core_pe/matchexif.py b/core_pe/matchexif.py index 21acdde8..0e9a657f 100644 --- a/core_pe/matchexif.py +++ b/core_pe/matchexif.py @@ -16,7 +16,7 @@ from hscommon.trans import tr from core.engine import Match from . import exif -def getmatches(files, j): +def getmatches(files, match_scaled, j): timestamp2pic = defaultdict(set) for picture in j.iter_with_progress(files, tr("Read EXIF of %d/%d pictures")): try: @@ -30,5 +30,8 @@ def getmatches(files, j): del timestamp2pic['0000:00:00 00:00:00'] matches = [] for pictures in timestamp2pic.values(): - matches += [Match(p1, p2, 100) for p1, p2 in combinations(pictures, 2)] + for p1, p2 in combinations(pictures, 2): + if (not match_scaled) and (p1.dimensions != p2.dimensions): + continue + matches.append(Match(p1, p2, 100)) return matches \ No newline at end of file diff --git a/core_pe/scanner.py b/core_pe/scanner.py index 0ecd11cf..bfee9180 100644 --- a/core_pe/scanner.py +++ b/core_pe/scanner.py @@ -20,7 +20,7 @@ class ScannerPE(Scanner): if self.scan_type == ScanType.FuzzyBlock: return matchblock.getmatches(files, self.cache_path, self.threshold, self.match_scaled, j) elif self.scan_type == ScanType.ExifTimestamp: - return matchexif.getmatches(files, j) + return matchexif.getmatches(files, self.match_scaled, j) else: raise Exception("Invalid scan type") diff --git a/help/en/preferences.rst b/help/en/preferences.rst index 70846f43..7fb6a41d 100644 --- a/help/en/preferences.rst +++ b/help/en/preferences.rst @@ -32,11 +32,11 @@ Preferences .. only:: edition_pe - **Scan Type:** This option determines the type of scan that will be made on your pictures. The **Contents** scan type compares the actual contents of the pictures in a fuzzy way (making it possible to find not only exact duplicates, but also similar ones). The **EXIF Timestamp** scan type looks at the EXIF metadata of the picture (if it exists) and matches pictures that have the same one. It's much faster than the Contents scan. + **Scan Type:** This option determines the type of scan that will be made on your pictures. The **Contents** scan type compares the actual contents of the pictures in a fuzzy way (making it possible to find not only exact duplicates, but also similar ones). The **EXIF Timestamp** scan type looks at the EXIF metadata of the picture (if it exists) and matches pictures that have the same one. It's much faster than the Contents scan. **Warning:** Modified pictures often keep the same EXIF timestamp, so watch out for false positives when you use that scan type. **Filter Hardness:** *Contents scan type only.* The higher is this setting, the "harder" is the filter (In other words, the less results you get). Most pictures of the same quality match at 100% even if the format is different (PNG and JPG for example.). However, if you want to make a PNG match with a lower quality JPG, you will have to set the filer hardness to lower than 100. The default, 95, is a sweet spot. - **Match scaled pictures together:** *Contents scan type only.* If you check this box, pictures of different dimensions will be allowed in the same duplicate group. + **Match pictures of different dimensions:** If you check this box, pictures of different dimensions will be allowed in the same duplicate group. **Can mix file kind:** If you check this box, duplicate groups are allowed to have files with different extensions. If you don't check it, well, they aren't! diff --git a/help/fr/preferences.rst b/help/fr/preferences.rst index 75b3604f..25811581 100644 --- a/help/fr/preferences.rst +++ b/help/fr/preferences.rst @@ -32,11 +32,11 @@ Préférences .. only:: edition_pe - **Type de scan:** Détermine le type de scan qui sera fait sur vos images. Le type **Contenu** compare le contenu des images de façon "fuzzy", rendant possible de trouver non seulement les doublons exactes, mais aussi les similaires. Le type **EXIF Timestamp** compare les métadonnées EXIF des images (si existantes) et détermine si le "timestamp" (moment de prise de la photo) est pareille. C'est beaucoup plus rapide que le scan par Contenu. + **Type de scan:** Détermine le type de scan qui sera fait sur vos images. Le type **Contenu** compare le contenu des images de façon "fuzzy", rendant possible de trouver non seulement les doublons exactes, mais aussi les similaires. Le type **EXIF Timestamp** compare les métadonnées EXIF des images (si existantes) et détermine si le "timestamp" (moment de prise de la photo) est pareille. C'est beaucoup plus rapide que le scan par Contenu. **Attention:** Les photos modifiées gardent souvent le même timestamp, donc faites attention aux faux doublons si vous utilisez cette méthode. **Seuil du filtre:** *Scan par Contenu seulement.* Plus il est élevé, plus les images doivent être similaires pour être considérées comme des doublons. Le défaut de 95% permet quelques petites différence, comme par exemple une différence de qualité ou bien une légère modification des couleurs. - **Comparer les images de tailles différentes:** *Scan par Contenu seulement.* Le nom dit tout. Sans cette option, les images de tailles différentes ne sont pas comparées. + **Comparer les images de tailles différentes:** Le nom dit tout. Sans cette option, les images de tailles différentes ne sont pas comparées. **Comparer les fichiers de différents types:** Sans cette option, seulement les fichiers du même type seront comparés. diff --git a/qt/lang/fr.ts b/qt/lang/fr.ts index bbc2e4ca..0a3bd74e 100644 --- a/qt/lang/fr.ts +++ b/qt/lang/fr.ts @@ -530,7 +530,7 @@ Année - Match scaled pictures together + Match pictures of different dimensions Comparer les images de tailles différentes diff --git a/qt/pe/preferences_dialog.py b/qt/pe/preferences_dialog.py index 9a1e56e4..a308ba92 100644 --- a/qt/pe/preferences_dialog.py +++ b/qt/pe/preferences_dialog.py @@ -32,7 +32,7 @@ class PreferencesDialog(PreferencesDialogBase): self._setupScanTypeBox(scanTypeLabels) self._setupFilterHardnessBox() self.widgetsVLayout.addLayout(self.filterHardnessHLayout) - self._setupAddCheckbox('matchScaledBox', tr("Match scaled pictures together")) + self._setupAddCheckbox('matchScaledBox', tr("Match pictures of different dimensions")) self.widgetsVLayout.addWidget(self.matchScaledBox) self._setupAddCheckbox('mixFileKindBox', tr("Can mix file kind")) self.widgetsVLayout.addWidget(self.mixFileKindBox) @@ -63,7 +63,6 @@ class PreferencesDialog(PreferencesDialogBase): scan_type = SCAN_TYPE_ORDER[self.scanTypeComboBox.currentIndex()] fuzzy_scan = scan_type == ScanType.FuzzyBlock self.filterHardnessSlider.setEnabled(fuzzy_scan) - self.matchScaledBox.setEnabled(fuzzy_scan) if __name__ == '__main__':