bitmap to quad conversion