Check the alpha on an image, using a really primitive loop.
()
| 280 | * Check the alpha on an image, using a really primitive loop. |
| 281 | */ |
| 282 | public void checkAlpha() { |
| 283 | if (pixels == null) return; |
| 284 | |
| 285 | //noinspection ForLoopReplaceableByForEach |
| 286 | for (int i = 0; i < pixels.length; i++) { |
| 287 | // since transparency is often at corners, hopefully this |
| 288 | // will find a non-transparent pixel quickly and exit |
| 289 | if ((pixels[i] & 0xff000000) != 0xff000000) { |
| 290 | format = ARGB; |
| 291 | break; |
| 292 | } |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | |
| 297 | ////////////////////////////////////////////////////////////// |
no outgoing calls
no test coverage detected