zoukankan      html  css  js  c++  java
  • 从内存中比较图片

    var
        MS1,MS2:TMemoryStream;
        FileName1,FileName2:string;
    begin
        MS1:=TMemoryStream.Create;
        MS2:=TMemoryStream.Create;
        FileName1:= 'C:\Documents   and   Settings\Administrtor\My   Documents\My   Pictures\200311813492623679.JPG ';
        FileName2:= 'C:\Documents   and   Settings\Administrtor\My   Documents\My   Pictures\200311813502850073.JPG ';
        try
            MS1.LoadFromFile(FileName1);
            MS2.LoadFromFile(FileName2);
            if   MS1.Size <> MS2.Size   then
            begin
                ShowMessage( '不同 ');
                Exit;
            end;
            if   CompareMem(MS1.Memory,MS2.Memory,MS1.Size)   then
                ShowMessage( '相同 ')
            else
                ShowMessage( '不同 ');
        finally
            MS1.Free;
            MS2.Free;
        end;
    end;

  • 相关阅读:
    【对拍√】
    hdu5791 TWO
    luogu P1220 关路灯
    【NOI2001】食物链
    【HAOI2016】食物链
    luogu P1006 传纸条
    可持久化平衡树
    可持久化并查集
    线段树合并(【POI2011】ROT-Tree Rotations)
    可持久化数组
  • 原文地址:https://www.cnblogs.com/zhusd/p/1870929.html
Copyright © 2011-2022 走看看