More concise version of get_pixels