summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk-pixbuf/io-ico.c7
-rw-r--r--tests/test-images/reftests/squares.icobin0 -> 6926 bytes
-rw-r--r--tests/test-images/reftests/squares.ico.ref.pngbin0 -> 259 bytes
3 files changed, 6 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-ico.c b/gdk-pixbuf/io-ico.c
index e6c1299fa..9448619c8 100644
--- a/gdk-pixbuf/io-ico.c
+++ b/gdk-pixbuf/io-ico.c
@@ -659,6 +659,7 @@ static void OneLine24(struct ico_progressive_state *context)
Pixels[X * 4 + 0] = context->LineBuf[X * 3 + 2];
Pixels[X * 4 + 1] = context->LineBuf[X * 3 + 1];
Pixels[X * 4 + 2] = context->LineBuf[X * 3 + 0];
+ Pixels[X * 4 + 3] = 0xff;
X++;
}
@@ -699,7 +700,7 @@ OneLine16 (struct ico_progressive_state *context)
*pixels++ = (r << 3) | (r >> 2);
*pixels++ = (g << 3) | (g >> 2);
*pixels++ = (b << 3) | (b >> 2);
- pixels++; /* skip alpha channel */
+ *pixels++ = 0xff;
}
}
@@ -726,6 +727,7 @@ static void OneLine8(struct ico_progressive_state *context)
context->HeaderBuf[4 * context->LineBuf[X] + INFOHEADER_SIZE + 1 +context->DIBoffset];
Pixels[X * 4 + 2] =
context->HeaderBuf[4 * context->LineBuf[X] + INFOHEADER_SIZE +context->DIBoffset];
+ Pixels[X * 4 + 3] = 0xff;
X++;
}
}
@@ -755,6 +757,7 @@ static void OneLine4(struct ico_progressive_state *context)
context->HeaderBuf[4 * (Pix>>4) + INFOHEADER_SIZE + 1 +context->DIBoffset];
Pixels[X * 4 + 2] =
context->HeaderBuf[4 * (Pix>>4) + INFOHEADER_SIZE + context->DIBoffset];
+ Pixels[X * 4 + 3] = 0xff;
X++;
if (X<context->Header.width) {
/* Handle the other 4 bit pixel only when there is one */
@@ -764,6 +767,7 @@ static void OneLine4(struct ico_progressive_state *context)
context->HeaderBuf[4 * (Pix&15) + INFOHEADER_SIZE + 1 + context->DIBoffset];
Pixels[X * 4 + 2] =
context->HeaderBuf[4 * (Pix&15) + INFOHEADER_SIZE + context->DIBoffset];
+ Pixels[X * 4 + 3] = 0xff;
X++;
}
}
@@ -793,6 +797,7 @@ static void OneLine1(struct ico_progressive_state *context)
Pixels[X * 4 + 0] = Bit*255;
Pixels[X * 4 + 1] = Bit*255;
Pixels[X * 4 + 2] = Bit*255;
+ Pixels[X * 4 + 3] = 0xff;
X++;
}
}
diff --git a/tests/test-images/reftests/squares.ico b/tests/test-images/reftests/squares.ico
new file mode 100644
index 000000000..6bda81b37
--- /dev/null
+++ b/tests/test-images/reftests/squares.ico
Binary files differ
diff --git a/tests/test-images/reftests/squares.ico.ref.png b/tests/test-images/reftests/squares.ico.ref.png
new file mode 100644
index 000000000..c0f603c0f
--- /dev/null
+++ b/tests/test-images/reftests/squares.ico.ref.png
Binary files differ