MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getSizeInBytes

Method getSizeInBytes

ij/src/main/java/ij/ImagePlus.java:1335–1344  ·  view source on GitHub ↗

Returns the size of this image in bytes.

()

Source from the content-addressed store, hash-verified

1333
1334 /** Returns the size of this image in bytes. */
1335 public double getSizeInBytes() {
1336 double size = ((double)getWidth()*getHeight()*getStackSize());
1337 int type = getType();
1338 switch (type) {
1339 case ImagePlus.GRAY16: size *= 2.0; break;
1340 case ImagePlus.GRAY32: size *= 4.0; break;
1341 case ImagePlus.COLOR_RGB: size *= 4.0; break;
1342 }
1343 return size;
1344 }
1345
1346 /** Returns the number of stack images. */
1347 public int getStackSize() {

Callers 3

setupMethod · 0.80
getValueMethod · 0.80
getImageSizeMethod · 0.80

Calls 4

getWidthMethod · 0.95
getHeightMethod · 0.95
getStackSizeMethod · 0.95
getTypeMethod · 0.95

Tested by

no test coverage detected