Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement threshold option #24

Open
fariasmaiquita opened this issue Jul 23, 2020 · 2 comments
Open

Implement threshold option #24

fariasmaiquita opened this issue Jul 23, 2020 · 2 comments

Comments

@fariasmaiquita
Copy link
Contributor

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.

@Pierstoval
Copy link
Member

Hey @fariasmaiquita, thanks for using this package 🙂

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? 😉

@Pierstoval
Copy link
Member

Fixed by #25 and released in 3.0.13 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants