php-watermark
php-watermark copied to clipboard
Font color
Add new function with name setFontColor to have ability to change font color. and this function accepting just RGB & RGBA format.
Example:
`$watermark->setFont('Arial') ->setFontSize(36) ->setOpacity(.4) ->setRotate(330) ->setFontColor('rgba(255, 255, 255,0)') ->setOffset(-80, 200) ->setPosition(Watermark::POSITION_RIGHT);
$text = "ajaxray.com"; $watermark->withText($text, DIR.'/img/result_simple.jpg');`
Assalamualaikum @shqawe1 ,
I am very happy that you've solved it and want to share the solution! 🤗
I was trying to test it and found a few tiny issues. If you can manage a few more minutes, can you please look into the points I've mentioned above?
Also, if you could list all the supported color formats that will work after merging this, that would be very much helpful. I'll use the list to add to the readme file.
Thanks a lot, brother! Your contribution is very much appreciated! ❤️
First of all i want you to accept my apologize for these mistakes because i wrote it quickly as copy paste from my project. And i reply with correct code for each one of the issue and i hope it will work without any issue.
About the color format the code accept rgb & rgba formats.
rgb(255, 255, 255)
rgba(255, 255, 255, 0.4)
Are there any plans to merge this? I want to use it for a project but could not do so without this functionality.