We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is some strange:
.gallery-manager .photo img { width: 140px; height: auto; } .gallery-manager .image-preview { height: 88px; overflow: hidden; }
/** * Widget preview height * @var int */ public $previewHeight = 200; /** * Widget preview width * @var int */ public $previewWidth = 200;
yii2-gallery-manager/GalleryBehavior.php
Lines 121 to 127 in 4a9ca72
The text was updated successfully, but these errors were encountered:
So... We can change a preview size and rules:
/** * Widget preview height * @var int */ public $previewHeight = 88; /** * Widget preview width * @var int */ public $previewWidth = 130;
$this->versions['preview'] = function ($originalImage) { $imagine = new \Imagine\Imagick\Imagine(); $image = $imagine->create(new \Imagine\Image\Box($this->previewWidth, $this->previewHeight)); /** @var ImageInterface $originalImage */ $thumbnail = $originalImage ->thumbnail(new Box($this->previewWidth, $this->previewHeight)); $size = $thumbnail->getSize(); return $image->paste($thumbnail, new \Imagine\Image\Point(floor(($this->previewWidth - $size->getWidth()) / 2), floor(($this->previewHeight - $size->getHeight()) / 2))); };
Sorry, something went wrong.
No branches or pull requests
This is some strange:
yii2-gallery-manager/GalleryBehavior.php
Lines 121 to 127 in 4a9ca72
The text was updated successfully, but these errors were encountered: