diff --git a/plug-ins/file-bmp/bmp-write.c b/plug-ins/file-bmp/bmp-write.c index f71ecb08e9..34652975da 100644 --- a/plug-ins/file-bmp/bmp-write.c +++ b/plug-ins/file-bmp/bmp-write.c @@ -602,20 +602,20 @@ write_image (FILE *f, Write (f, buf, 3); break; case RGBX_8888: - buf[0] = 0; buf[3] = *temp++; buf[2] = *temp++; buf[1] = *temp++; + buf[0] = 0; xpos++; if (channels > 3 && (guchar) *temp == 0) buf[0] = buf[1] = buf[2] = 0xff; Write (f, buf, 4); break; case RGBA_8888: + buf[3] = *temp++; buf[2] = *temp++; buf[1] = *temp++; - buf[0] = *temp++; - buf[3] = *temp; + buf[0] = *temp; xpos++; Write (f, buf, 4); break;