Ticket #831: patchbmppalalpha.diff

File patchbmppalalpha.diff, 702 bytes (added by Carl Eugen Hoyos, 15 years ago)
  • libavcodec/bmpenc.c

    diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c
    index 63c3b72..3305757 100644
    a b static int bmp_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_s  
    128128    bytestream_put_le32(&buf, 0);                     // BITMAPINFOHEADER.biClrUsed
    129129    bytestream_put_le32(&buf, 0);                     // BITMAPINFOHEADER.biClrImportant
    130130    for (i = 0; i < pal_entries; i++)
    131         bytestream_put_le32(&buf, pal[i] & 0xFFFFFF);
     131        bytestream_put_le32(&buf, pal[i]);
    132132    // BMP files are bottom-to-top so we start from the end...
    133133    ptr = p->data[0] + (avctx->height - 1) * p->linesize[0];
    134134    buf = buf0 + hsize;