Losing metadata while saving UIImage in HEIC format

Thank you for the this content! As a new Swift developer I grateful for this resource.

I am following this tutorial https://www.raywenderlich.com/4726843-heic-image-compression-for-ios to save a UIImage in HEIC format and everything works great except I noticed that some of the metadata information is lost when the heicData function is called on the image. Specifically I noticed that the Orientation information is lost.

What would be the best way to fix this?

This topic was automatically closed after 166 days. New replies are no longer allowed.