Selenium-Screenshot
view release on metacpan or search on metacpan
lib/Selenium/Screenshot.pm view on Meta::CPAN
);
$self->_cmp->set_method(
method => &Image::Compare::IMAGE,
args => $scale
);
# Do the actual pixel by pixel comparison. This can take a while.
my $diff = $self->_cmp->compare;
# Post processing to overlay the difference onto the
# opponent. First, subtract a white box from our difference image;
# to make everything white transparent instead.
my $work = Imager->new(
xsize => $diff->getwidth,
ysize => $diff->getheight,
channels => $diff->getchannels
);
$work->box(filled => 1, color => $white );
$diff = $work->difference(other => $diff);
( run in 1.117 second using v1.01-cache-2.11-cpan-49f99fa48dc )