0

I have noticed that the new Mojave wallpaper under macOS Catalina has been re-encoded for larger resolution and according to metadata it support tiles. I can drag out single TIFF images from preview and more info still shows the tile support for individual TIFF files. However, when I try to recreate HEIC file from those TIFF files I lose tile support. How to create HEIC image with tile support?

heic image metadata

NSMutableData *mData = [NSMutableData data];
CGImageDestinationRef destination;
destination = CGImageDestinationCreateWithData((CFMutableDataRef)mData,
                                              (CFStringRef)AVFileTypeHEIC,
                                              numberOfImages,
                                              NULL);
NSDictionary *options = @{(id)kCGImageDestinationLossyCompressionQuality: @(1.0),
                         (id)kCGImagePropertyTIFFTileWidth : @(1024), //-> no effect 
                         (id)kCGImagePropertyTIFFTileLength : @(1024) //-> no effect
                         };
CGImageDestinationAddImageAndMetadata(destination, imageRef, imageMetadata, (CFDictionaryRef)options);

enter image description here

Marek H
  • 5,173
  • 3
  • 31
  • 42

1 Answers1

0

As per ATS tile support is automatic since macOS Catalina. This is the reason I couldn't make it work on Mojave. Code above behaves correctly on Catalina.

Marek H
  • 5,173
  • 3
  • 31
  • 42