Subject: | Bug in Image::Hash b2h subprogramm |
Date: | Thu, 11 Jun 2015 09:56:25 +0300 |
To: | bug-Image-Hash [...] rt.cpan.org |
From: | Igor . <disop2004 [...] mail.ru> |
hello Runar Buvik.
thanks for usefull util "Image::Hash" , but it have some bug.
testing system: Win x64 ; perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x64-multi-thread (ActiveState Perl)
Bug found while testing included image print-hashes-for-files.pl "images/FishEyeViewofAtlantis.jpg"
phash:
GD : AB802A1820002000 1010101110000000001010100001100000100000000000000010000000000000
ImageMagick : AB8022188200020 1010101110000000001000100001100000001000001000000000000000100000
Bug: HEX LENGTH - is different ! ( length AB802A1820002000 vs length AB8022188200020 ) (with equal binary length) . trouble with sub "b2h".
simplest way for improve : use "my $WIDTH = 4;" beside "my $WIDTH = 32;" in "sub b2h"
Result after fix:
phash:
GD : AB802A1820002000 1010101110000000001010100001100000100000000000000010000000000000
ImageMagick : AB80221808200020 1010101110000000001000100001100000001000001000000000000000100000
( this char "0" was lost before fix ==> ImageMagick : AB802218-->0<--8200020 1010101110000000001000100001100000001000001000000000000000100000 )
please check it and fix if posible.
thanks
---
With Best Regards, Igor.