mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
fix(#63): improve visibility of blurry text in 2c png
This commit is contained in:
parent
f25d40ba46
commit
0eab9ca2b2
1 changed files with 5 additions and 0 deletions
|
|
@ -122,7 +122,12 @@ class ImageGenerationService
|
||||||
if ($rotate !== null && $rotate !== 0) {
|
if ($rotate !== null && $rotate !== 0) {
|
||||||
$imagick->rotateImage(new ImagickPixel('black'), $rotate);
|
$imagick->rotateImage(new ImagickPixel('black'), $rotate);
|
||||||
}
|
}
|
||||||
|
|
||||||
$imagick->setImageType(Imagick::IMGTYPE_GRAYSCALE);
|
$imagick->setImageType(Imagick::IMGTYPE_GRAYSCALE);
|
||||||
|
|
||||||
|
// Sharpen the image to make blurry text more defined
|
||||||
|
$imagick->sharpenImage(0.7, 0.5);
|
||||||
|
|
||||||
if ($quantize) {
|
if ($quantize) {
|
||||||
$imagick->quantizeImage(2, Imagick::COLORSPACE_GRAY, 0, true, false);
|
$imagick->quantizeImage(2, Imagick::COLORSPACE_GRAY, 0, true, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue