Sets ImageInfo to info following the rules in setImageInfo() and allocates pixel memory. Memory is zeroed. Returns false and calls reset() if ImageInfo could not be set, or memory could not be allocated, or memory could not optionally be zeroed. On most platforms, allocating pixel
(@NotNull ImageInfo imageInfo, boolean zeroPixels)
| 404 | * @return true if pixels allocation is successful |
| 405 | */ |
| 406 | public boolean allocPixelsFlags(@NotNull ImageInfo imageInfo, boolean zeroPixels) { |
| 407 | try { |
| 408 | _imageInfo = null; |
| 409 | Stats.onNativeCall(); |
| 410 | return _nAllocPixelsFlags(_ptr, |
| 411 | imageInfo._width, |
| 412 | imageInfo._height, |
| 413 | imageInfo._colorInfo._colorType.ordinal(), |
| 414 | imageInfo._colorInfo._alphaType.ordinal(), |
| 415 | Native.getPtr(imageInfo._colorInfo._colorSpace), |
| 416 | zeroPixels ? 1 : 0); |
| 417 | } finally { |
| 418 | Reference.reachabilityFence(this); |
| 419 | Reference.reachabilityFence(imageInfo._colorInfo._colorSpace); |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | /** |
| 424 | * <p>Sets ImageInfo to info following the rules in setImageInfo() and allocates pixel |
no test coverage detected