Libraryless. Click here for Pure Java version (49L/1K).
static double alphaChannelAverage(int[] pixels) { int n = pixels.length; long sum = 0; for i to n: sum += rgbAlpha(pixels[i]); ret doubleRatio(sum, n); }
Began life as a copy of #1035299
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035301 |
Snippet name: | alphaChannelAverage |
Eternal ID of this version: | #1035301/1 |
Text MD5: | ba38ab09921c05deff68eaab69f536ca |
Transpilation MD5: | 496d421a696bc9c07eed806da51930ae |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-29 04:04:12 |
Source code size: | 171 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 143 / 189 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |