You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When inserting images in a Word document I sometimes find the quality of these images poor. Especially for JPEG files. I discovered that in src/PhpWord/Element/Image.php the function imagejpeg() is used for creating an image in the document. That function has a parameter called $quality. According to https://www.php.net/imagejpeg, a quality of about 75 is used as default for generating the jpeg. I find this value to be too low.
Describe the solution you'd like
The functions imagejpeg() and imagepng() have a parameter called $quality. I'd like PHPWord to pass a value for that parameter and default it to the maximum quality.
For imagejpeg(), the value for the maximum quality is 100.
Is your feature request related to a problem? Please describe.
When inserting images in a Word document I sometimes find the quality of these images poor. Especially for JPEG files. I discovered that in src/PhpWord/Element/Image.php the function
imagejpeg()
is used for creating an image in the document. That function has a parameter called$quality
. According to https://www.php.net/imagejpeg, a quality of about 75 is used as default for generating the jpeg. I find this value to be too low.Describe the solution you'd like
The functions
imagejpeg()
andimagepng()
have a parameter called$quality
. I'd like PHPWord to pass a value for that parameter and default it to the maximum quality.imagejpeg()
, the value for the maximum quality is100
.imagepng()
, the value for the maximum quality is0
(see https://www.php.net/imagepng).Describe alternatives you've considered
None.
Additional context
Before (JPEG quality of 75 in Word document):
After (JPEG quality of 100 in Word document):
The text was updated successfully, but these errors were encountered: