I found following code for ASTC encoding:
This code produce data in KTX format. I can not find any documentation about kCGImagePropertyASTCBlockSize parameter name so I consider that this code is undocumented.
I have two questions:
Code Block NSMutableData *data = [NSMutableData data]; CGImageDestinationRef destination = CGImageDestinationCreateWithData((CFMutableDataRef)data, (CFStringRef)@"org.khronos.ktx", 1, nil); NSDictionary *properties = @{@"kCGImagePropertyASTCBlockSize": @(0x88)}; CGImageDestinationAddImage(destination, source, (CFDictionaryRef)properties); CGImageDestinationFinalize(destination);
This code produce data in KTX format. I can not find any documentation about kCGImagePropertyASTCBlockSize parameter name so I consider that this code is undocumented.
I have two questions:
Is it safe to use it? May Apple change this in future?
Is it hardware encoding or CPU encoding?