[DefineBitsLosslessTag] Fix paletted image stride and BPP

Test case bug #1098348