(x_create_im): New function to set IM and IC of a frame.