shahriyardx / easy-pil

A library to make common tasks of Pillow easy.
https://easy-pil.readthedocs.io/
MIT License
41 stars 15 forks source link

add shadow behind texts #11

Closed aurkaxi closed 2 years ago

aurkaxi commented 2 years ago

texts are not always clearly visible because of the background picture. adding shadow is the proper solution in my opinion. how to?

Corban-Lee commented 2 years ago

You can do this yourself by pasting the same text on top of each other with an offset

aurkaxi commented 2 years ago

i switched to pillow, how to i set an "offset"

Corban-Lee commented 2 years ago

an offset is just the difference between two values or in this case, the difference between the position of your shadow text with your normal text.

So to create a drop shadow you could paste the text in your shadow color and then paste your text again in your normal color 5 pixels above and to the left. This would imitate a drop shadow.

Those 5 pixels above and 5 pixels to the left are your offset.

Depending on your font size you may want to change the number of pixels in your offset.