From 7bad5e30a928e81db7537f281c43d30726cb47c1 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 5 Sep 2006 16:18:30 -0700 Subject: [PATCH] Correct the memory layout for the BGRA32 color space --- com32/lib/jpeg/bgra32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/com32/lib/jpeg/bgra32.c b/com32/lib/jpeg/bgra32.c index d6f9791..ba0db70 100644 --- a/com32/lib/jpeg/bgra32.c +++ b/com32/lib/jpeg/bgra32.c @@ -355,9 +355,9 @@ static int initialize_bgra32(struct jdec_private *priv, unsigned int *bytes_per_mcu) { if (priv->components[0] == NULL) - priv->components[0] = (uint8_t *)malloc(priv->width * priv->height * 3); - bytes_per_blocklines[0] = priv->width * 3; - bytes_per_mcu[0] = 3*8; + priv->components[0] = (uint8_t *)malloc(priv->width * priv->height * 4); + bytes_per_blocklines[0] = priv->width * 4; + bytes_per_mcu[0] = 4*8; return !priv->components[0]; } -- 2.7.4