Skip to content

Commit 4e1bf14

Browse files
committed
Update Video.java
Fix RGBA to ARGB losing alpha as explained in #2021
1 parent 60e672b commit 4e1bf14

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • java/libraries/video/src/processing/video

java/libraries/video/src/processing/video/Video.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static protected void convertToARGB(int[] pixels, int width, int height) {
212212
for (int y = 0; y < height; y++) {
213213
for (int x = 0; x < width; x++) {
214214
int pixel = pixels[p++];
215-
pixels[t++] = (pixel >> 8) | ((pixel << 24) & 0xFF000000);
215+
pixels[t++] = (pixel >>> 8) | ((pixel << 24) & 0xFF000000);
216216
}
217217
}
218218

0 commit comments

Comments
 (0)