Fix wrong pixel maximum (should always be < width|height)