swap image pointers instead of copying