-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Place image to alpha channels in canvas #5403
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stackoverflow link:
https://stackoverflow.com/questions/53419584/place-image-to-alpha-channels-in-canvas
http://jsfiddle.net/alperxx/t521jra4/ (fiddle)
https://tablom34.com/collage/upload (live demo)
I need to find top, left, max width and max height values of all alpha channels in canvas.
I have 4 transparent place in canvas in live url. but i can't detect true places. First alpha channel corners colour must be red. Next is: black, yellow and green. But my groups is not correct.
If I complete the groups truely, every uploading photos will place to alpha places.
My Processes are in comment.
`
function alphaRatio(ctx) {
var pixelData = ctx.getImageData(0, 0, ctx.canvas.width, ctx.canvas.height);
const data = pixelData.data;
const pixel_groups = [];
If any one has a another way, please share. I lost 4 days.
The text was updated successfully, but these errors were encountered: