From 6d76792dfc219fde9289d0792ea813cb31aaf511 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 9 Feb 2020 22:37:00 +0100 Subject: [PATCH] calculate md5 checksum of image data Exact comparison in diffs. --- termimg | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/termimg b/termimg index 4270464..20fda70 100755 --- 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', -- 2.30.0