This reverts commit 2919c3fdb4. For formats like BGRX, looping through 0..num_components works fine. But for formats like XRGB, we'd check the color mask for X and fail to check it for B.
2919c3fdb4