Free memory by calling imagedestroy()