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

Sharpen filter adds transparancy lines #220

Open
Andrej64 opened this issue Jul 16, 2017 · 4 comments
Open

Sharpen filter adds transparancy lines #220

Andrej64 opened this issue Jul 16, 2017 · 4 comments

Comments

@Andrej64
Copy link

When i use the sharpen filter on the canvas it adds on top and bottom a transparancy line.
Saving as png the lines are clearly visible.
Is this normal?

thanks.

@Esc4pism
Copy link

i had the same issue and was able to solve it by changing a small thing in the Renderer.prototype.renderKernel - function

i switched out the Math.max and Math.min respectively on these 2 lines:

start = Math.max(start, this.c.dimensions.width * 4 * ((adjustSize - 1) / 2));
end = Math.min(end, n - (this.c.dimensions.width * 4 * ((adjustSize - 1) / 2)));

to:

start = Math.min(start, this.c.dimensions.width * 4 * ((adjustSize - 1) / 2));
end = Math.max(end, n - (this.c.dimensions.width * 4 * ((adjustSize - 1) / 2)));

@BenQuirk
Copy link

I'm having the same issue. Depending on the level of sharpness, it renders a transparent line at just the bottom of the image or the top and bottom.

I tried the fix from Esc4pism - it worked to remove the transparent line at the top of the image but there's still a transparent line at the bottom.

I tried editing the level of sharpness but that did not change the issue.

Still looking for a solution.

@LeParadoxHD
Copy link

LeParadoxHD commented Jul 5, 2019

Same here, when using the sharpness filter with a value greater than 0 gives some transparent block at the bottom of the result image. Please fix it.

@bumblebeehub
Copy link

bumblebeehub commented Aug 12, 2019

I can't use the sharpen function, can anyone help me?
Each time I use this.sharpen(5), I get an error this.sharpen is not a function.
Thanks in advance.

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

4 participants