Browse Source

ImageMagick invalid image handling

pull/40/head
Savetheinternet 13 years ago
parent
commit
ecb42bcc6d
  1. 7
      inc/image.php

7
inc/image.php

@ -142,7 +142,12 @@
$this->image = new Imagick();
}
public function from() {
$this->image->readImage($this->src);
try {
$this->image->readImage($this->src);
} catch(ImagickException $e) {
// invalid image
$this->image = false;
}
}
public function to($src) {
$this->image->writeImage($src);

Loading…
Cancel
Save