update image borders