Taking care of image buffers.