mirror of
https://github.com/hyprwm/hyprgraphics.git
synced 2026-05-05 08:48:05 +02:00
fmt fully
This commit is contained in:
parent
1a845aee1f
commit
00f8782b26
2 changed files with 5 additions and 5 deletions
|
|
@ -91,7 +91,7 @@ static CMatrix3 Bradford = CMatrix3(std::array<std::array<double, 3>, 3>{
|
|||
|
||||
static CMatrix3 BradfordInv = Bradford.invert();
|
||||
|
||||
CMatrix3 Hyprgraphics::adaptWhite(const CColor::xy& src, const CColor::xy& dst) {
|
||||
CMatrix3 Hyprgraphics::adaptWhite(const CColor::xy& src, const CColor::xy& dst) {
|
||||
if (src == dst)
|
||||
return CMatrix3::identity();
|
||||
|
||||
|
|
|
|||
|
|
@ -107,10 +107,10 @@ static std::expected<cairo_surface_t*, std::string> loadPNG(png_structp png, png
|
|||
png_read_image(png, rowPointers.data());
|
||||
|
||||
for (size_t i = 0; i < W * H * 4; i += 4) {
|
||||
uint8_t r = rawData[i + 0];
|
||||
uint8_t g = rawData[i + 1];
|
||||
uint8_t b = rawData[i + 2];
|
||||
uint8_t a = rawData[i + 3];
|
||||
uint8_t r = rawData[i + 0];
|
||||
uint8_t g = rawData[i + 1];
|
||||
uint8_t b = rawData[i + 2];
|
||||
uint8_t a = rawData[i + 3];
|
||||
|
||||
r *= ((float)a) / 255.F;
|
||||
g *= ((float)a) / 255.F;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue