mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
Fix build on Windows.
We added our own implementation of rand_r to make sure we use the same as Gimp, and to make Windows work. But we need to actually use it everywhere. Discussion in Differential: Differential Revision: https://phabricator.kde.org/D25267
This commit is contained in:
parent
c60e77c048
commit
497b6b81bd
@ -3179,7 +3179,7 @@ void XCFImageFormat::dissolveRGBPixels(QImage &image, int x, int y)
|
||||
}
|
||||
|
||||
for (int k = 0; k < image.width(); k++) {
|
||||
int rand_val = rand_r(&next) & 0xff;
|
||||
int rand_val = RandomTable::rand_r(&next) & 0xff;
|
||||
QRgb pixel = image.pixel(k, l);
|
||||
|
||||
if (rand_val > qAlpha(pixel)) {
|
||||
@ -3211,7 +3211,7 @@ void XCFImageFormat::dissolveAlphaPixels(QImage &image, int x, int y)
|
||||
}
|
||||
|
||||
for (int k = 0; k < image.width(); k++) {
|
||||
int rand_val = rand_r(&next) & 0xff;
|
||||
int rand_val = RandomTable::rand_r(&next) & 0xff;
|
||||
uchar alpha = image.pixelIndex(k, l);
|
||||
|
||||
if (rand_val > alpha) {
|
||||
|
Loading…
Reference in New Issue
Block a user