Dropping frames on moviestim and imagestim

This is the code that is being worked with currently, for some reason whenever it is ran it continually drops frames. Also, with certain still images it also drops frames. Below is an example of the code that displays a still image and drops frames.