Method: VIPS::Header#n_elements

Defined in:
ext/header.c

#n_elementsNumeric

Returns the number of elements in an image row, i.e. bands * x_size.

Returns:

  • (Numeric)


253
254
255
256
257
258
259
260
261
262
# File 'ext/header.c', line 253

static VALUE
header_n_elements(VALUE obj)
{
    GetImg(obj, data, im);

    if (im)
        return INT2FIX(IM_IMAGE_N_ELEMENTS(im));

    return Qnil;
}