-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow sharpening amount in sharpen parameter #3
Comments
Absolutely. So long as the library is compatible with TimThumb's approach out of the box (or can be configured to be) then I am more than happy to add in any other diverging and enhanced functionality. In this case I think we can add this in either of the following ways:
My preference leans toward the second approach as then we're reusing current parameters and enhancing them a bit rather than adding further variables to the mix. If you had a reason to explicitly pass a 1 or a 0 as the sharpen level then you could just pass it as |
Yes, the second approach sounds perfect. |
can you test out the |
As with TimThumb, the sharpening parameter is a binary on-off affair. And as with TimThumb, I find the default level of sharpening to be too strong. Adjusting the level of sharpening in TimThumb requires tweaking the values in the sharpening matrix - thankfully it's much easier in ImThumb and just requires a simple adjustment to the blur value in resizeImage(). I found 0.8 was about right to my eye.
The amount of sharpening needed is a matter of taste, and can vary according to the size of the generated image. So my request is instead of "s=1"/"s=0" to enable/disable sharpening, could the amount of sharpening be passed in the parameter, e.g. "s=0.8"?
Note: I realise that part of the intention behind the ImThumb project is provide a drop-in replacement for TimThumb. However, TimThumb has certain shortcomings (IMO) so perhaps there's an argument for deviating from the TimThumb approach?
The text was updated successfully, but these errors were encountered: