Add support for alpha maps to compute_crc32_for_image().
authorSøren Sandmann Pedersen <ssp@redhat.com>
Mon, 28 May 2012 20:14:12 +0000 (16:14 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 2 Jun 2012 11:55:11 +0000 (07:55 -0400)
commitdc9237472789b0b45393f6f7eeafa057a86280c4
tree54f13cff86901ca2a8f945284daf1f268f64227f
parent43e029d525c191a771e5b964fccff09b6d341bb2
Add support for alpha maps to compute_crc32_for_image().

When a destination image I has an alpha map A, the following rules apply:

   - If I has an alpha channel itself, the content of that channel is
     undefined

   - If A has RGB channels, the content of those channels is
     undefined.

Hence in order to compute the CRC32 for such an image, we have to mask
off the alpha channel of the image, and the RGB channels of the alpha
map.

V2: Shifting by 32 is undefined in C
test/utils.c