MCPcopy Create free account
hub / github.com/JetBrains/skija / computeByteSize

Method computeByteSize

shared/java/ImageInfo.java:226–229  ·  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

224 * @see <a href="https://fiddle.skia.org/c/@ImageInfo_computeByteSize">https://fiddle.skia.org/c/@ImageInfo_computeByteSize</a>
225 */
226 public long computeByteSize(long rowBytes) {
227 if (0 == _height) return 0;
228 return (_height - 1) * rowBytes + _width * getBytesPerPixel();
229 }
230
231 /**
232 * <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