fix: crop save dropped blue channel brightness/contrast offset (v1.4.2)
Build & Release / build-linux (push) Has been cancelled
Build & Release / build-windows (push) Has been cancelled
Build & Release / create-release (push) Has been cancelled

m[13] (blue alpha coefficient, always 0) was read as the blue offset instead of
m[14], so saved JPEGs lost the blue brightness/contrast offset and came out with a
color cast. Saturation/rotate were unaffected (no offsets).

Also: version 1.4.2, CHANGELOG entry, dist/ ships imajviewer_1.4.2_amd64.deb
(replaces 1.4.1).
This commit is contained in:
Alhan committed 2026-10-12 22:22:04 +03:00
1 parent afe99198ff
commit b3bd540549
5 files changed
+10 -3

No files matched your search

+1 -1
View File
@@ -143,7 +143,7 @@ class CropSaveService {
final r = pixel.r.toDouble(), g = pixel.g.toDouble(), b = pixel.b.toDouble();
pixel.r = (m[0] * r + m[1] * g + m[2] * b + m[4]).clamp(0, 255).round();
pixel.g = (m[5] * r + m[6] * g + m[7] * b + m[9]).clamp(0, 255).round();
pixel.b = (m[10] * r + m[11] * g + m[12] * b + m[13]).clamp(0, 255).round();
pixel.b = (m[10] * r + m[11] * g + m[12] * b + m[14]).clamp(0, 255).round();
}
}
}