Libraryless. Click here for Pure Java version (49L/1K).
1 | static double alphaChannelAverage(int[] pixels) {
|
2 | int n = pixels.length; |
3 | long sum = 0; |
4 | for i to n: |
5 | sum += rgbAlpha(pixels[i]); |
6 | ret doubleRatio(sum, n); |
7 | } |
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: | 370 / 460 |
| Referenced in: | [show references] |