1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-17 19:26:25 +02:00

Set resolution for new images with Imagick driver

This commit is contained in:
Oliver Vogel
2023-10-29 09:28:06 +01:00
parent 2a9a0f1cc1
commit f19be728ef

View File

@@ -61,6 +61,11 @@ class ImageFactory implements FactoryInterface
return new Image($animation->imagick);
}
/**
* {@inheritdoc}
*
* @see FactoryInterface::newCore()
*/
public function newCore(int $width, int $height)
{
$imagick = new Imagick();
@@ -68,6 +73,7 @@ class ImageFactory implements FactoryInterface
$imagick->setType(Imagick::IMGTYPE_UNDEFINED);
$imagick->setImageType(Imagick::IMGTYPE_UNDEFINED);
$imagick->setColorspace(Imagick::COLORSPACE_RGB);
$imagick->setImageResolution(96, 96);
return $imagick;
}