Bug 997304 - Copy the image data if it's not a suitable size for cairo. r=Bas