Added freeimage code