Commit 030a61a9 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Handle bmps with more than 8 bits per channel. (#172584, David Costanzo)

2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * io-bmp.c (decode_bitmasks): Handle bmps
        with more than 8 bits per channel.  (#172584,
        David Costanzo)
parent 21e120cc
2006-12-22 Matthias Clasen <mclasen@redhat.com>
* io-bmp.c (decode_bitmasks): Handle bmps
with more than 8 bits per channel. (#172584,
David Costanzo)
* io-bmp.c: Handle offsets more carefully. (#172188,
David Costanzo)
......
......@@ -605,6 +605,23 @@ decode_bitmasks (guchar *buf,
}
}
if (State->r_bits > 8) {
State->r_shift += State->r_bits - 8;
State->r_bits = 8;
}
if (State->g_bits > 8) {
State->g_shift += State->g_bits - 8;
State->g_bits = 8;
}
if (State->b_bits > 8) {
State->b_shift += State->b_bits - 8;
State->b_bits = 8;
}
if (State->a_bits > 8) {
State->a_shift += State->a_bits - 8;
State->a_bits = 8;
}
State->read_state = READ_STATE_DATA;
State->BufferDone = 0;
State->BufferSize = State->LineWidth;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment