public function isValid(): bool
{
if ($this->isImagick()) {
- return ($this->image !== false);
+ return !empty($this->image);
}
return $this->valid;
}
if ($image->isImagick()) {
try {
$colors = $image->image->getImagePixelColor($x, $y)->getColor();
- } catch (\Throwable $th) {
+ } catch (\Exception $exception) {
return '';
}
$row[] = [$colors['r'], $colors['g'], $colors['b']];