diff options
Diffstat (limited to 'graphics/pixelformat.h')
-rw-r--r-- | graphics/pixelformat.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index 9dd06241b7..7b966a8a15 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -215,6 +215,10 @@ struct PixelFormat { return (8 - aLoss); } + inline byte bpp() const { + return rBits() + gBits() + bBits() + aBits(); + } + //////////////////////////////////////////////////////////////////////// // Convenience functions for getting color components' maximum values // //////////////////////////////////////////////////////////////////////// |