It sounds more like a beat on a color component, where the color component is one of (Alpha) / Red / Green / Blue or Gray. So take a bit by component and multiply by components by pixel to get a bit by pixel. For example, if you are talking about an RGB image, you have 3 components. RGB with 8 bits per component will be 8 * 3 = 24 bits per pixel of the image. If it's shades of gray, for example. one component, 8 bits per component will be 8 bits per pixel.
source share