mirror of
https://github.com/friendica/friendica
synced 2024-12-24 16:40:15 +00:00
Merge pull request #507 from fermionic/imagick-profile-photos-squashed
use getWidth and getHeight, which are agnostic to Imagick being enabled
This commit is contained in:
commit
1c66fed5c4
1 changed files with 33 additions and 31 deletions
|
@ -129,6 +129,7 @@ class Photo {
|
|||
$this->image->setCompressionQuality($quality);
|
||||
}
|
||||
|
||||
// The 'width' and 'height' properties are only used by non-Imagick routines.
|
||||
$this->width = $this->image->getImageWidth();
|
||||
$this->height = $this->image->getImageHeight();
|
||||
$this->valid = true;
|
||||
|
@ -205,8 +206,8 @@ class Photo {
|
|||
if(!$this->is_valid())
|
||||
return FALSE;
|
||||
|
||||
$width = $this->width;
|
||||
$height = $this->height;
|
||||
$width = $this->getWidth();
|
||||
$height = $this->getHeight();
|
||||
|
||||
$dest_width = $dest_height = 0;
|
||||
|
||||
|
@ -277,8 +278,9 @@ class Photo {
|
|||
$this->image->scaleImage($dest_width, $dest_height);
|
||||
} while ($this->image->nextImage());
|
||||
|
||||
// FIXME - also we need to copy the new dimensions to $this->height, $this->width as other functions
|
||||
// may rely on it.
|
||||
// These may not be necessary any more
|
||||
$this->width = $this->image->getImageWidth();
|
||||
$this->height = $this->image->getImageHeight();
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -402,8 +404,8 @@ class Photo {
|
|||
return FALSE;
|
||||
|
||||
|
||||
$width = $this->width;
|
||||
$height = $this->height;
|
||||
$width = $this->getWidth();
|
||||
$height = $this->getHeight();
|
||||
|
||||
$dest_width = $dest_height = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue