LibImage: Add rgba getter for Image::Color

Actually the format is 0xAARRGGBB which is what my framebuffer uses.
This commit is contained in:
Bananymous 2024-06-16 00:23:02 +03:00
parent e6549b0fe8
commit 14d4551476
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@ namespace LibImage
.a = static_cast<uint8_t>(a.a * a_mult + b.a * b_mult),
};
}
uint32_t as_rgba() const
{
return ((uint32_t)a << 24) | ((uint32_t)r << 16) | ((uint32_t)g << 8) | b;
}
};
enum class ResizeAlgorithm