image-write: fix monochrome bitmap writing from 8-bit-buffers

Now writing out monochrome bitmaps from 8-bit arrays works
as it does when using PNG.

Bitmaps need 3 bytes per pixel.
pull/323/head
Patrick Boettcher 2016-06-15 10:36:39 +02:00
parent c9ead07188
commit 734576e6be
1 changed files with 1 additions and 3 deletions

View File

@ -293,9 +293,7 @@ static void stbiw__write_pixel(stbi__write_context *s, int rgb_dir, int comp, in
s->func(s->context, &d[comp - 1], 1);
switch (comp) {
case 1:
s->func(s->context,d,1);
break;
case 1: /* fall-through wanted */
case 2:
if (expand_mono)
stbiw__write3(s, d[0], d[0], d[0]); // monochrome bmp