MCPcopy Create free account
hub / github.com/HumbleUI/Skija / computeByteSize

Method computeByteSize

shared/java/ImageInfo.java:227–230  ·  view source on GitHub ↗

Returns storage required by pixel array, given ImageInfo dimensions, ColorType, and rowBytes. rowBytes is assumed to be at least as large as #getMinRowBytes(). Returns zero if height is zero. @param rowBytes size of pixel row or larger @return memory required by pix

(long rowBytes)

Source from the content-addressed store, hash-verified

225 * @see <a href="https://fiddle.skia.org/c/@ImageInfo_computeByteSize">https://fiddle.skia.org/c/@ImageInfo_computeByteSize</a>
226 */
227 public long computeByteSize(long rowBytes) {
228 if (0 == _height) return 0;
229 return (_height - 1) * rowBytes + _width * getBytesPerPixel();
230 }
231
232 /**
233 * <p>Returns storage required by pixel array, given ImageInfo dimensions, and

Callers 1

computeMinByteSizeMethod · 0.95

Calls 1

getBytesPerPixelMethod · 0.95

Tested by

no test coverage detected