fixed bw with image

fixed the bw with image function