free image memory after resized