Changed PNG conversion to method