added some code for item/ bitmap decoding