Image.depth

int depth() const nothrow @nogc

Gets the image depth (bytes per pixel).

Returns

Depth (1=mono, 2=gray+alpha, 3=RGB, 4=RGBA), or 0 if invalid