CLONE_SKIP simply unblesses the thingy on thread creation, so for the
image to be valid the IMG entry needs to be blessed (as well as true)
sub _valid_image {
my ($self, $method) = @_;
- $self->{IMG} and return 1;
+ $self->{IMG} && Scalar::Util::blessed($self->{IMG}) and return 1;
- my $msg = 'empty input image';
+ my $msg = $self->{IMG} ? "images do not cross threads" : "empty input image";
$msg = "$method: $msg" if $method;
$self->_set_error($msg);