Though a bit late for you @sindresorhus it might still be valuable information for others to come. A workaround could be interfacing with sips via cli. You can test wether it fits your need like sips -s format png [ -s formatOptions best ] /path/to/image.heic --out "test.png".