canal alfa a partir de una imagen en p5js
Never
let img; let alphaImg; function preload() { img = loadImage('imagen.jpg'); } function setup() { createCanvas(400, 400); // Crea una imagen con canal alfa del mismo tamaño que la imagen original alphaImg = createImage(img.width, img.height); } function draw() { background(220); // Dibuja la imagen actual image(img, 0, 0); // Crea el canal alfa alphaImg.loadPixels(); img.loadPixels(); for (let i = 0; i < img.pixels.length; i += 4) { // Calcula el valor del canal alfa en función del brillo de cada píxel let brightness = (img.pixels[i] + img.pixels[i + 1] + img.pixels[i + 2]) / 3; alphaImg.pixels[i] = 255; // Canal rojo alphaImg.pixels[i + 1] = 255; // Canal verde alphaImg.pixels[i + 2] = 255; // Canal azul alphaImg.pixels[i + 3] = brightness; // Canal alfa } alphaImg.updatePixels(); // Aplica la máscara img.mask(alphaImg); }
Raw Text
-
Just chill and fuck at home
19 min ago
-
EVILANGEL Sexy Romanian Student Seduces Tutor into Anal Fuck - Alyssa Bounty
49 min ago
-
🌚🌠R@PED😏 SLEEPING💤 LITTLE GIRLS🙈👧🍬✨🌝
1 hour ago
-
Step mom unexpected step son's suck?! He fucks her till cum in mouth 💦
1 hour ago
-
Trailer MilfCandy: GILF Maddie Cross gets her some Dior Boi on MilfCandy
1 hour ago
-
Backpacker Nata Ocean Opens Her Legs For BBC Roommate - HORNY HOSTEL
2 hours ago
-
Lesbian Prison Guard Has Anal Threesome With Inmates
2 hours ago
-
Jodi Taylor Gets Ass Pounded By Mike Adriano's Big Hard Cock
3 hours ago
-
Happy birthday! I'll let you fuck me, but don't cum inside! - AdaKham
3 hours ago
-
My sexy stepsister invite me for great fuck
4 hours ago