Functions to get/set sprite frame.