fixed issues with image resize and setcolor