added util to convert images