calculate md5 checksum of image data
[minime.git] / termimg
diff --git a/termimg b/termimg
index 42704647bd37b5a9dbbdf45b6d561351bde9dc58..20fda7059188617b6603812047067d756470b605 100755 (executable)
--- a/termimg
+++ b/termimg
@@ -37,6 +37,14 @@ my @info = eval {
        );
 } or warn $@;
 
+eval {
+       require Digest::MD5;
+       open my $bin, '<', $file;
+       binmode $bin;
+       my $md5 = Digest::MD5->new->addfile($bin);
+       push @info, ' # '.$md5->b64digest;
+} or warn $@;
+
 open my $pgm, '-|', convert => (
        -compress => 'none',
        '+distort' => SRT => '0,0 1,.56 0',