Limting image height prevents returning incorrect pixels