ImageMagickPHP
ImageMagickPHP copied to clipboard
Implement threshold option
Hi thanks for this package!
Could you by any chance implement the threshold option? I would do it myself and make a pull request but I'm not yet well versed enough on things to try it out myself.
Hope to hear from you soon.
Hey @fariasmaiquita, thanks for using this package :slightly_smiling_face:
If you want to contribute, first check the details of the option to know what are the arguments: http://www.imagemagick.org/script/command-line-options.php#threshold
Then, you see that the value is either a signed number with or without the %
sign, so you can take examples of options like this one (-strokewidth
) for the base implementation.
For the validator, you can create a function threshold(string $value)
method in the References.php
class to check that the value is a percentage or number, and if validation fails, throw an exception with as many explanations as you can, just like in other validation methods.
Does this seem doable for your first contribution here? :wink:
Fixed by #25 and released in 3.0.13 :rocket: