Commit 2dec48e1 authored by John Ellson's avatar John Ellson

fix for gd jpg imageloader inventing transparency when ther is none

parent a8449994
......@@ -146,6 +146,7 @@ static void gd_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean fil
width, height, stride);
if (im->trueColor) {
if (im->saveAlphaFlag) {
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
px = gdImageTrueColorPixel(im, x, y);
......@@ -156,6 +157,18 @@ static void gd_loadimage_cairo(GVJ_t * job, usershape_t *us, boxf b, boolean fil
}
}
}
else {
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
px = gdImageTrueColorPixel(im, x, y);
*data++ = gdTrueColorGetBlue(px);
*data++ = gdTrueColorGetGreen(px);
*data++ = gdTrueColorGetRed(px);
*data++ = 0xFF;
}
}
}
}
else {
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment