飘云阁

 找回密码
 加入我们

QQ登录

只需一步,快速开始

查看: 13979|回复: 41

[原创] Duplicate Photo Finder Plus 简单算法分析

  [复制链接]
  • TA的每日心情
    开心
    2019-2-27 15:18
  • 签到天数: 205 天

    [LV.7]常住居民III

    发表于 2016-11-2 11:04:01 | 显示全部楼层 |阅读模式
    本帖最后由 yosen2001 于 2016-11-2 11:05 编辑

    软件名称:Duplicate Photo Finder Plus
    官方网站:http://duplicatefilefinder4pc.com
    官方下载:http://duplicatefilefinder4pc.com/duplicate-photo-finder-plus.htm


    Description


    Duplicate Photo Finder Plus - Quickly finds the duplicate pictures on your drives relied on picture content, you can remove the unwanted pictures to recover your valuable disk space, reduce the management costs and avoid the unnecessary confusion.
    It works very fast because of our high-speed picture comparison algorithm is built-in. And the result (duplicate pictures) is 100% accurate due to it compares pictures relied on picture content, not picture name, last modified date or file size.
    Also, it is very easy to use, only need to select the resources, type(s), and then click the "Find now" button to get your want. Even, you can simply click this button directly by using the suggested search conditions.
    Once the finding is done, you will see the result (the duplicate pictures list and previews for the selected group) instantly. It checks the unwanted pictures automatically with the smart selection feature, sorts the result by size in descending, and marks the adjacent duplicate picture groups by different colors, in order to let you operate the duplicate pictures conveniently. You can also do some common actions for the checked duplicate pictures / highlighted picture in the result listing, such as Save, Load, Move to Recycle Bin, Delete, Open/Run, Open File Location, Find, Uncheck All, Invert Checks and Show Properties.
    Sure, you can use some options (e.g. smart selection, whether scan the system / hidden files or not, and exclude folders) to affect the final result.

    翻译
    介绍
    Duplicate Photo Finder Plus - 快速找到您的驱动器上的重复图片依赖于图片内容,您可以删除不需要的图片,以恢复您的宝贵的磁盘空间,降低管理成本,避免不必要的混乱。
    它的工作速度非常快,因为我们的高速图片比较算法是内置的。和结果(重复的图片)是100%准确,因为它比较图片依赖于图片内容,而不是图片名称,最后修改日期或文件大小。
    此外,它是非常容易使用,只需要选择资源,类型,然后单击“立即查找”按钮来获得你想要的。即使,您也可以直接使用建议的搜索条件直接点击此按钮。
    一旦查找完成,您将立即看到结果(所选组的重复图片列表和预览)。它使用智能选择功能自动检查不需要的照片,按照大小降序排列结果,并用不同的颜色标记相邻的重复照片组,以便您方便地操作重复的照片。您还可以对结果列表中检查的重复图片/突出显示的图片执行一些常见操作,例如保存,加载,移动到回收站,删除,打开/运行,打开文件位置,查找,取消全部检查,取消检查和显示属性。
    当然,您可以使用一些选项(例如智能选择,是否扫描系统/隐藏文件,以及排除文件夹)以影响最终结果。

    算法关键函数如下:

    [AppleScript] 纯文本查看 复制代码
    
    public static bool VerifyKey(string key, ref string type)
            {
                    int num;
                    bool flag;
                    int num2;
                    try
                    {
                            ProjectData.ClearProjectError();
                            num = 2;
                            string text = key.Trim();
                            string text2 = string.Empty;
                            if (text.Length == 19)
                            {
                                    if (Operators.CompareString(text.Substring(0, 4), "TDPF", false) == 0)
                                    {
                                            if (Operators.CompareString(text.Substring(4, 1), "-", false) == 0)
                                            {
                                                    text2 = SelfService.Letter2Num(text.Substring(5, 2));
                                                    if (Conversions.ToInteger(text2) <= 59 && Conversions.ToInteger(text2) >= 0)
                                                    {
                                                            text2 = SelfService.Letter2Num(text.Substring(7, 2));
                                                            if (Conversions.ToInteger(text2) <= 12 && Conversions.ToInteger(text2) >= 1)
                                                            {
                                                                    if (Operators.CompareString(text.Substring(9, 1), "-", false) == 0)
                                                                    {
                                                                            text2 = SelfService.Letter2Num(text.Substring(10, 2));
                                                                            if (Conversions.ToInteger(text2) <= 31 && Conversions.ToInteger(text2) >= 1)
                                                                            {
                                                                                    text2 = text.Substring(12, 2);
                                                                                    if (General.InStrings(text2, new string[]
                                                                                    {
                                                                                            "SG",
                                                                                            "PS",
                                                                                            "HM",
                                                                                            "TM",
                                                                                            "EP"
                                                                                    }))
                                                                                    {
                                                                                            if (Operators.CompareString(text.Substring(14, 1), "-", false) == 0)
                                                                                            {
                                                                                                    text2 = SelfService.Letter2Num(text.Substring(15, 2));
                                                                                                    if (Conversions.ToInteger(text2) <= 23 && Conversions.ToInteger(text2) >= 0)
                                                                                                    {
                                                                                                            text2 = SelfService.Letter2Num(text.Substring(17, 2));
                                                                                                            if (Conversions.ToInteger(text2) <= 59 && Conversions.ToInteger(text2) >= 0)
                                                                                                            {
                                                                                                                    type = text.Substring(12, 2);
                                                                                                                    flag = true;
                                                                                                                    goto IL_1E3;
                                                                                                            }
                                                                                                    }
                                                                                            }
                                                                                    }
                                                                            }
                                                                    }
                                                            }
                                                    }
                                            }
                                    }
                            }
                            IL_19A:
                            flag = false;
                            goto IL_1E3;
                            num2 = -1;
                            @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                            IL_1B4:
                            goto IL_1D8;
                    }
                    object arg_1B6_0;
                    endfilter(arg_1B6_0 is Exception & num != 0 & num2 == 0);
                    IL_1D8:
                    throw ProjectData.CreateProjectError(-2146828237);
                    IL_1E3:
                    bool arg_1ED_0 = flag;
                    if (num2 != 0)
                    {
                            ProjectData.ClearProjectError();
                    }
                    return arg_1ED_0;
            }
    
    ///////////////////==========================
    private static string Letter2Num(string letters)
            {
                    int num2;
                    string text2;
                    int num3;
                    try
                    {
                            IL_00:
                            int num = 1;
                            if (LikeOperator.LikeString(Declarer.startPath, "*Debug", CompareMethod.Binary))
                            {
                                    goto IL_1E;
                            }
                            IL_15:
                            ProjectData.ClearProjectError();
                            num2 = -2;
                            IL_1E:
                            num = 4;
                            string text = string.Empty;
                            IL_27:
                            num = 5;
                            char[] array = letters.ToCharArray();
                            IL_31:
                            num = 6;
                            char[] array2 = array;
                            int i = 0;
                            checked
                            {
                                    while (i < array2.Length)
                                    {
                                            char c = array2[#];////把这个#换成i;
                                            IL_45:
                                            num = 7;
                                            switch (c)
                                            {
                                            case 'C':
                                                    IL_12B:
                                                    num = 29;
                                                    text += "2";
                                                    IL_13B:
                                                    break;
                                            case 'D':
                                                    IL_119:
                                                    num = 26;
                                                    text += "4";
                                                    IL_129:
                                                    break;
                                            case 'E':
                                            case 'F':
                                            case 'H':
                                            case 'I':
                                            case 'J':
                                            case 'L':
                                            case 'M':
                                            case 'N':
                                            case 'O':
                                            case 'Q':
                                            case 'R':
                                            case 'U':
                                            case 'V':
                                            case 'W':
                                                    goto IL_173;
                                            case 'G':
                                                    IL_F5:
                                                    num = 20;
                                                    text += "0";
                                                    IL_105:
                                                    break;
                                            case 'K':
                                                    IL_14F:
                                                    num = 35;
                                                    text += "6";
                                                    IL_15F:
                                                    break;
                                            case 'P':
                                                    IL_13D:
                                                    num = 32;
                                                    text += "5";
                                                    IL_14D:
                                                    break;
                                            case 'S':
                                                    IL_CB:
                                                    num = 14;
                                                    text += "9";
                                                    IL_DB:
                                                    break;
                                            case 'T':
                                                    IL_161:
                                                    num = 38;
                                                    text += "7";
                                                    IL_171:
                                                    break;
                                            case 'X':
                                                    IL_107:
                                                    num = 23;
                                                    text += "8";
                                                    IL_117:
                                                    break;
                                            case 'Y':
                                                    IL_E0:
                                                    num = 17;
                                                    text += "3";
                                                    IL_F0:
                                                    break;
                                            case 'Z':
                                                    IL_B6:
                                                    num = 11;
                                                    text += "1";
                                                    IL_C6:
                                                    break;
                                            default:
                                                    goto IL_173;
                                            }
                                            IL_183:
                                            i++;
                                            IL_189:
                                            num = 43;
                                            continue;
                                            IL_173:
                                            num = 41;
                                            text += "ERROR!";
                                            goto IL_183;
                                    }
                                    IL_198:
                                    num = 44;
                                    text2 = text;
                                    IL_1A3:
                                    goto IL_2B9;
                                    IL_1A8:;
                            }
                            int arg_1AF_0 = num3 + 1;
                            num3 = 0;
                            @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], arg_1AF_0);
                            IL_26C:
                            goto IL_2AE;
                            num3 = num;
                            @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], (num2 > -2) ? num2 : 1);
                            IL_28A:
                            goto IL_2AE;
                    }
                    object arg_28C_0;
                    endfilter(arg_28C_0 is Exception & num2 != 0 & num3 == 0);
                    IL_2AE:
                    throw ProjectData.CreateProjectError(-2146828237);
                    IL_2B9:
                    string arg_2C3_0 = text2;
                    if (num3 != 0)
                    {
                            ProjectData.ClearProjectError();
                    }
                    return arg_2C3_0;
            }
    
    


    算法总结
    游客,如果您要查看本帖隐藏内容请回复


    单机版
    1.jpg
    游客,如果您要查看本帖隐藏内容请回复

    个人版
    3.jpg

    游客,如果您要查看本帖隐藏内容请回复

    家庭版
    10.jpg

    游客,如果您要查看本帖隐藏内容请回复

    团队版

    100.jpg

    游客,如果您要查看本帖隐藏内容请回复

    企业版
    666.jpg

    游客,如果您要查看本帖隐藏内容请回复



    游客,如果您要查看本帖隐藏内容请回复






    评分

    参与人数 7威望 +44 飘云币 +28 收起 理由
    雾落尘 + 4 PYG有你更精彩!
    阳光宅男 + 4 + 4 PYG有你更精彩!
    m2m + 4 PYG有你更精彩!
    ZMZwise + 4 PYG有你更精彩!
    orz + 4
    gagmeng + 20 + 20 PYG有你更精彩!
    Dxer + 4 + 4 PYG有你更精彩!

    查看全部评分

    PYG19周年生日快乐!
  • TA的每日心情
    开心
    16 分钟前
  • 签到天数: 1613 天

    [LV.Master]伴坛终老

    发表于 2016-11-2 11:23:59 | 显示全部楼层
    一锅端了,这家软件身板小但功能挺强,速度快,。
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    难过
    2024-3-10 19:49
  • 签到天数: 473 天

    [LV.9]以坛为家II

    发表于 2016-11-2 11:39:54 | 显示全部楼层
    表哥太狠了吧。支持下
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    9 小时前
  • 签到天数: 1681 天

    [LV.Master]伴坛终老

    发表于 2016-11-2 11:57:54 | 显示全部楼层
    多谢表哥的全家桶
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-7-9 08:20
  • 签到天数: 869 天

    [LV.10]以坛为家III

    发表于 2016-11-2 12:13:34 | 显示全部楼层
    妖僧大表哥威武!
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    慵懒
    2024-3-20 15:56
  • 签到天数: 617 天

    [LV.9]以坛为家II

    发表于 2016-11-2 12:24:06 | 显示全部楼层
    威武!威武!威武!
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    慵懒
    2024-3-20 15:56
  • 签到天数: 617 天

    [LV.9]以坛为家II

    发表于 2016-11-2 12:40:37 | 显示全部楼层
    真牛,學習,感谢分享,
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    2023-11-27 16:47
  • 签到天数: 114 天

    [LV.6]常住居民II

    发表于 2016-11-2 13:27:01 | 显示全部楼层
    连续三个。牛逼啊。
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    9 小时前
  • 签到天数: 2315 天

    [LV.Master]伴坛终老

    发表于 2016-11-2 13:44:29 | 显示全部楼层
    这 个也太牛X了全部处理掉啦
    PYG19周年生日快乐!
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 加入我们

    本版积分规则

    快速回复 返回顶部 返回列表