Update image_util_encode_set_output_buffer to return error when image type is BMP