finish code register image