Applied patch from Tadashi Kba for set_data and bitmaps. I also changed the function prototype for memcpy (from string to buffer_in).