Minor fixes and support for HEIC images
This commit is contained in:
@@ -133,6 +133,7 @@ class Photo extends Abstracted\Catalog
|
||||
if (array_key_exists($this->orientation,$this->_rotate))
|
||||
$imo->rotateImage(new \ImagickPixel('none'),$this->_rotate[$this->orientation]);
|
||||
|
||||
$imo->setImageFormat('jpg');
|
||||
return $imo->getImageBlob();
|
||||
}
|
||||
|
||||
@@ -236,7 +237,13 @@ class Photo extends Abstracted\Catalog
|
||||
public function thumbnail($rotate=TRUE)
|
||||
{
|
||||
if (! $this->thumbnail) {
|
||||
return $this->o()->thumbnailimage(200,200,true,true) ? $this->_o->getImageBlob() : NULL;
|
||||
if ($this->o()->thumbnailimage(200,200,true,false)) {
|
||||
$this->_o->setImageFormat('jpg');
|
||||
return $this->_o->getImageBlob();
|
||||
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $rotate OR ! array_key_exists($this->orientation,$this->_rotate) OR ! extension_loaded('imagick'))
|
||||
@@ -244,6 +251,7 @@ class Photo extends Abstracted\Catalog
|
||||
|
||||
$imo = new \Imagick();
|
||||
$imo->readImageBlob($this->thumbnail);
|
||||
$imo->setImageFormat('jpg');
|
||||
|
||||
return $this->rotate($imo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user