Use getPixel function instead of offset from event