used list comprehension to generate the pixel map.