forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
CoreImage tvOS xcode9 beta1
Sebastien Pouliot edited this page Aug 12, 2017
·
2 revisions
#CoreImage.framework
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIBarcodeDescriptor.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIBarcodeDescriptor.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIBarcodeDescriptor.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIBarcodeDescriptor.h 2017-05-20 00:41:58.000000000 -0400
@@ -0,0 +1,377 @@
+/* CoreImage - CIBarcodeDescriptor.h
+
+ Copyright (c) 2017 Apple, Inc.
+ All rights reserved. */
+
+#import <CoreImage/CoreImageDefines.h>
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @class CIBarcodeDescriptor
+ @abstract
+ CIBarcodeDescriptor is an abstract base class that defines an abstract representation of a machine readable code's symbol attributes.
+
+ @discsussion
+ Each subclass is sufficient to recreate the symbol exactly as seen or to be used with a custom parser. Subclasses of CIBarcodeDescriptor are defined for each code type to contain the formal specification of each symbology.
+
+ */
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIBarcodeDescriptor : NSObject <NSSecureCoding, NSCopying>
+@end
+
+/*!
+ @enum CIQRCodeErrorCorrectionLevel
+ @abstract
+ Constants indicating the percentage of the symbol that is dedicated to error correction.
+
+ @constant CIQRCodeErrorCorrectionLevelL
+ Indicates that approximately 20% of the symbol data is dedicated to error correction.
+ @constant CIQRCodeErrorCorrectionLevelM
+ Indicates that approximately 37% of the symbol data is dedicated to error correction.
+ @constant CIQRCodeErrorCorrectionLevelQ
+ Indicates that approximately 55% of the symbol data is dedicated to error correction.
+ @constant CIQRCodeErrorCorrectionLevelH
+ Indicates that approximately 65% of the symbol data is dedicated to error correction.
+ */
+typedef CF_ENUM(NSInteger, CIQRCodeErrorCorrectionLevel)
+{
+ CIQRCodeErrorCorrectionLevelL NS_SWIFT_NAME(levelL) = 'L',
+ CIQRCodeErrorCorrectionLevelM NS_SWIFT_NAME(levelM) = 'M',
+ CIQRCodeErrorCorrectionLevelQ NS_SWIFT_NAME(levelQ) = 'Q',
+ CIQRCodeErrorCorrectionLevelH NS_SWIFT_NAME(levelH) = 'H',
+
+} NS_SWIFT_NAME(CIQRCodeDescriptor.ErrorCorrectionLevel);
+
+/*!
+ @class CIQRCodeDescriptor
+ @abstract
+ CIQRCodeDescriptor is a concrete subclass of CIBarcodeDescriptor that defines an abstract representation of a QR code symbol.
+ */
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIQRCodeDescriptor : CIBarcodeDescriptor
+{
+ NSData *errorCorrectedPayload;
+
+ NSInteger symbolVersion;
+ uint8_t maskPattern;
+ CIQRCodeErrorCorrectionLevel errorCorrectionLevel;
+}
+
+/*!
+ @property errorCorrectedPayload
+ @abstract
+ The error-corrected codewords that comprise the QR code symbol.
+
+ @discussion
+ QR Codes are formally specified in ISO/IEC 18004:2006(E). Section 6.4.10 "Bitstream to codeword conversion" specifies the set of 8-bit codewords in the symbol immediately prior to splitting the message into blocks and applying error correction.
+
+ During decode, error correction is applied and if successful, the message is re-ordered to the state immediately following "Bitstream to codeword coversion." The errorCorrectedPayload corresponds to this sequence of 8-bit codewords.
+ */
+@property (readonly) NSData *errorCorrectedPayload;
+
+/*!
+ @property symbolVersion
+ @abstract
+ The version property corresponds to the size of the QR Code.
+
+ @discussion
+ QR Codes are square. ISO/IEC 18004 defines versions from 1 to 40, where a higher symbol version indicates a larger data carrying capacity. This field is required in order to properly interpret the error corrected payload.
+ */
+@property (readonly) NSInteger symbolVersion;
+
+/*!
+ @property maskPattern
+ @abstract
+ The data mask pattern for the QR code symbol.
+
+ @discussion
+ QR Codes support eight data mask patterns, which are used to avoid large black or large white areas inside the symbol body. Valid values range from 0 to 7.
+ */
+@property (readonly) uint8_t maskPattern;
+
+/*!
+ @property errorCorrectionLevel
+ @abstract
+ The error correction level of the QR code.
+
+ @discussion
+ QR Codes support four levels of Reed-Solomon error correction, in increasing error correction capability: L, M, Q, and H.
+ */
+@property (readonly) CIQRCodeErrorCorrectionLevel errorCorrectionLevel;
+
+// Initializes a descriptor that can be used as input to CIBarcodeGenerator
+- (nullable instancetype)initWithPayload:(NSData *)errorCorrectedPayload
+ symbolVersion:(NSInteger)symbolVersion
+ maskPattern:(uint8_t)maskPattern
+ errorCorrectionLevel:(CIQRCodeErrorCorrectionLevel)errorCorrectionLevel;
+
+// Construct an autoreleased descriptor that can be used as input to CIBarcodeGenerator
++ (nullable instancetype)descriptorWithPayload:(NSData *)errorCorrectedPayload
+ symbolVersion:(NSInteger)symbolVersion
+ maskPattern:(uint8_t)maskPattern
+ errorCorrectionLevel:(CIQRCodeErrorCorrectionLevel)errorCorrectionLevel;
+
+@end
+
+
+/*!
+ @class CIAztecCodeDescriptor
+ @abstract
+ CIAztecCodeDescriptor is a concrete subclass of CIBarcodeDescriptor that defines an abstract representation of an Aztec Code symbol.
+
+ @discussion
+ CIAztecCodeDescriptor may not be instantiated directly.
+ */
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIAztecCodeDescriptor : CIBarcodeDescriptor
+{
+ NSData *errorCorrectedPayload;
+
+ BOOL isCompact;
+ NSInteger layerCount;
+ NSInteger dataCodewordCount;
+}
+
+/*!
+ @property errorCorrectedPayload
+ @abstract
+ The error-corrected codewords that comprise the Aztec code symbol.
+
+ @discussion
+ Aztec Codes are formally specified in ISO/IEC 24778:2008(E).
+
+ The error corrected payload consists of the 6-, 8-, 10-, or 12-bit message codewords produced at the end of the step described in section 7.3.1.2 "Formation of data codewords", which exists immediately prior to adding error correction. These codewords have dummy bits inserted to ensure that an entire codeword isn't all 0's or all 1's. Clients will need to remove these extra bits as part of interpreting the payload.
+ */
+@property (readonly) NSData *errorCorrectedPayload;
+
+/*!
+ @property isCompact
+ @abstract
+ A BOOL indicating whether the symbol is compact.
+
+ @discussion
+ Compact Aztec symbols use one-fewer ring in the central finder pattern than full-range Aztec symbols of the same number of data layers.
+ */
+@property (readonly) BOOL isCompact;
+
+/*!
+ @property layerCount
+ @abstract
+ The number of data layers in the Aztec code symbol.
+
+ @discussion
+ Combined with the isCompact property, the number of data layers determines the number of modules in the Aztec Code symbol. Valid values range from 1 to 32. Compact symbols can have up to 4 data layers.
+
+ The number of data layers also determines the number of bits in each data codeword of the message carried by the Aztec Code symbol.
+ */
+@property (readonly) NSInteger layerCount;
+
+/*!
+ @property dataCodewordCount
+ @abstract
+ The number of non-error-correction codewords carried by the Aztec code symbol.
+
+ @discussion
+ Used to determine the level of error correction in conjunction with the number of data layers. Valid values are 1...2048. Compact symbols can have up to 64 message codewords.
+
+ Note that this value can exceed the number of message codewords allowed by the number of data layers in this symbol. In this case, the actual number of message codewords is 1024 fewer than this value and the message payload is to be interpreted in an application-defined manner.
+ */
+@property (readonly) NSInteger dataCodewordCount;
+
+// Initializes a descriptor that can be used as input to CIBarcodeGenerator
+- (nullable instancetype)initWithPayload:(NSData *)errorCorrectedPayload
+ isCompact:(BOOL)isCompact
+ layerCount:(NSInteger)layerCount
+ dataCodewordCount:(NSInteger)dataCodewordCount;
+
+// Construct an autoreleased descriptor that can be used as input to CIBarcodeGenerator
++ (nullable instancetype)descriptorWithPayload:(NSData *)errorCorrectedPayload
+ isCompact:(BOOL)isCompact
+ layerCount:(NSInteger)layerCount
+ dataCodewordCount:(NSInteger)dataCodewordCount;
+
+@end
+
+/*!
+ @class CIPDF417CodeDescriptor
+ @abstract
+ CIPDF417CodeDescriptor is a concrete subclass of CIBarcodeDescriptor that defines an abstract representation of a PDF417 code symbol.
+
+ @discussion
+ Refer to the ISO/IEC 15438:2006(E) for the PDF417 symbol specification.
+
+ */
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIPDF417CodeDescriptor : CIBarcodeDescriptor
+{
+ NSData *errorCorrectedPayload;
+
+ BOOL isCompact;
+ NSInteger rowCount;
+ NSInteger columnCount;
+}
+
+/*!
+ @property errorCorrectedPayload
+ @abstract
+ The error-corrected codewords which comprise the PDF417 symbol. The first codeword indicates the number of data codewords in the errorCorrectedPayload.
+
+ @discussion
+ PDF417 codes are comprised of a start character on the left and a stop character on the right. Each row begins and ends with special characters indicating the current row as well as information about the dimensions of the PDF417 symbol. The errorCorrectedPayload represents the sequence of PDF417 codewords that make up the body of the message. The first codeword indicates the number of codewords in the message. This count includes the "count" codeword and any padding codewords, but does not include the error correction codewords. Each codeword is a 16-bit value in the range of 0...928. The sequence is to be interpreted as described in the PDF417 bar code symbology specification -- ISO/IEC 15438:2006(E).
+ */
+@property(readonly) NSData *errorCorrectedPayload;
+
+/*!
+ @property isCompact
+ @abstract
+ A BOOL indicating whether the symbol is compact.
+
+ @discussion
+ Compact PDF417 symbols have abbreviated right-side guard bars.
+ */
+@property (readonly) BOOL isCompact;
+
+/*!
+ @property rowCount
+ @abstract
+ Indicates the number of rows in the rectangular matrix.
+
+ @discussion
+ rowCount values range from 3 to 90.
+ */
+@property (readonly) NSInteger rowCount;
+
+/*!
+ @property columnCount
+ @abstract
+ Indicates the number of columns in the rectangular matrix, excluding the columns used to indicate the symbol structure.
+
+ @discussion
+ columnCount values range from 1 to 30.
+ */
+@property (readonly) NSInteger columnCount;
+
+// Initializes a descriptor that can be used as input to CIBarcodeGenerator
+- (nullable instancetype)initWithPayload:(NSData *)errorCorrectedPayload
+ isCompact:(BOOL)isCompact
+ rowCount:(NSInteger)rowCount
+ columnCount:(NSInteger)columnCount;
+
+// Construct an autoreleased descriptor that can be used as input to CIBarcodeGenerator
++ (nullable instancetype)descriptorWithPayload:(NSData *)errorCorrectedPayload
+ isCompact:(BOOL)isCompact
+ rowCount:(NSInteger)rowCount
+ columnCount:(NSInteger)columnCount;
+
+@end
+
+
+/*!
+ @enum CIDataMatrixCodeECCVersion
+ @abstract
+ Constants indicating the Data Matrix code ECC version.
+
+ @discussion
+ ECC 000 - 140 symbols offer five levels of error correction using convolutional code error correction. Each successive level of error correction offers more protection for the message data and increases the size of the symbol required to carry a specific message. ECC 000 symbols offer no data protection. The other modes are described in ISO/IEC 16022:2006 and enumerated in this list only for completeness.
+
+ ECC 200 symbols utilize Reed-Solomon error correction. The error correction capacity for any given Data Matrix symbol is fixed by the size (in rows and columns) of the symbol. See Table 7 of ISO/IEC 16022:2006(E) for more details.
+
+ @constant CIDataMatrixCodeECCVersion000
+ Indicates error correction using convolutional code error correction with no data protection.
+ @constant CIDataMatrixCodeECCVersion050
+ Indicates 1/4 of the symbol is dedicated to convolutional code error correction.
+ @constant CIDataMatrixCodeECCVersion080
+ Indicates 1/3 of the symbol is dedicated to convolutional code error correction.
+ @constant CIDataMatrixCodeECCVersion100
+ Indicates 1/2 of the symbol is dedicated to convolutional code error correction.
+ @constant CIDataMatrixCodeECCVersion140
+ Indicates 3/4 of the symbol is dedicated to convolutional code error correction.
+ @constant CIDataMatrixCodeECCVersion200
+ Indicates error correction using Reed-Solomon error correction. Data protection overhead varies based on symbol size.
+ */
+typedef CF_ENUM(NSInteger, CIDataMatrixCodeECCVersion)
+{
+ CIDataMatrixCodeECCVersion000 NS_SWIFT_NAME(v000) = 0,
+ CIDataMatrixCodeECCVersion050 NS_SWIFT_NAME(v050) = 50,
+ CIDataMatrixCodeECCVersion080 NS_SWIFT_NAME(v080) = 80,
+ CIDataMatrixCodeECCVersion100 NS_SWIFT_NAME(v100) = 100,
+ CIDataMatrixCodeECCVersion140 NS_SWIFT_NAME(v140) = 140,
+ CIDataMatrixCodeECCVersion200 NS_SWIFT_NAME(v200) = 200,
+
+} NS_SWIFT_NAME(CIDataMatrixCodeDescriptor.ECCVersion);
+
+/*!
+ @class CIDataMatrixCodeDescriptor
+ @abstract
+ CIDataMatrixCodeDescriptor is a concrete subclass of CIBarcodeDescriptor that defines an abstract representation of a Data Matrix code symbol.
+
+ */
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIDataMatrixCodeDescriptor : CIBarcodeDescriptor
+{
+ NSData *errorCorrectedPayload;
+
+ NSInteger rowCount;
+ NSInteger columnCount;
+ CIDataMatrixCodeECCVersion eccVersion;
+}
+
+/*!
+ @property errorCorrectedPayload
+ @abstract
+ The error corrected payload that comprise the Data Matrix code symbol.
+
+ @discussion
+ DataMatrix symbols are specified bn ISO/IEC 16022:2006(E). ECC 200-type symbols will always have an even number of rows and columns.
+
+ For ECC 200-type symbols, the phases of encoding data into a symbol are described in section 5.1 -- Encode procedure overview. The error corrected payload comprises the de-interleaved bits of the message described at the end of Step 1: Data encodation.
+ */
+@property (readonly) NSData *errorCorrectedPayload;
+
+/*!
+ @property rowCount
+ @abstract
+ The number of module rows.
+
+ @discussion
+ Refer to ISO/IEC 16022:2006(E) for valid module row and column count combinations.
+ */
+@property (readonly) NSInteger rowCount;
+
+/*!
+ @property columnCount
+ @abstract
+ The number of module columns.
+
+ @discussion
+ Refer to ISO/IEC 16022:2006(E) for valid module row and column count combinations.
+ */
+@property (readonly) NSInteger columnCount;
+
+/*!
+ @property eccVersion
+ @abstract
+ The Data Matrix code ECC version.
+
+ @discussion
+ Valid values are 000, 050, 080, 100, 140, and 200. Any symbol with an even number of rows and columns will be ECC 200.
+ */
+@property (readonly) CIDataMatrixCodeECCVersion eccVersion;
+
+// Initializes a descriptor that can be used as input to CIBarcodeGenerator
+- (nullable instancetype)initWithPayload:(NSData *)errorCorrectedPayload
+ rowCount:(NSInteger)rowCount
+ columnCount:(NSInteger)columnCount
+ eccVersion:(CIDataMatrixCodeECCVersion)eccVersion;
+
+// Construct an autoreleased descriptor that can be used as input to CIBarcodeGenerator
++ (nullable instancetype)descriptorWithPayload:(NSData *)errorCorrectedPayload
+ rowCount:(NSInteger)rowCount
+ columnCount:(NSInteger)columnCount
+ eccVersion:(CIDataMatrixCodeECCVersion)eccVersion;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIColor.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIColor.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIColor.h 2016-08-12 00:56:42.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIColor.h 2017-05-19 22:49:32.000000000 -0400
@@ -74,17 +74,17 @@
* The value of the NSString will be the same each time it is called. */
@property (readonly) NSString *stringRepresentation;
-// Some convenience methods to create CIColors in the sRGB colorspace.
-+ (instancetype)blackColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)whiteColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)grayColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)redColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)greenColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)blueColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)cyanColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)magentaColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)yellowColor NS_AVAILABLE(10_12, 10_0);
-+ (instancetype)clearColor NS_AVAILABLE(10_12, 10_0);
+/* Convenience constant CIColors in the sRGB colorspace. */
+@property (class, strong, readonly) CIColor *blackColor NS_SWIFT_NAME(black) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *whiteColor NS_SWIFT_NAME(white) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *grayColor NS_SWIFT_NAME(gray) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *redColor NS_SWIFT_NAME(red) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *greenColor NS_SWIFT_NAME(green) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *blueColor NS_SWIFT_NAME(blue) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *cyanColor NS_SWIFT_NAME(cyan) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *magentaColor NS_SWIFT_NAME(magenta) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *yellowColor NS_SWIFT_NAME(yellow) NS_AVAILABLE(10_12, 10_0);
+@property (class, strong, readonly) CIColor *clearColor NS_SWIFT_NAME(clear) NS_AVAILABLE(10_12, 10_0);
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIContext.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIContext.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIContext.h 2016-08-10 20:27:20.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIContext.h 2017-05-23 01:18:58.000000000 -0400
@@ -263,6 +263,10 @@
#endif
/* Render 'image' to the given bitmap.
+ * The 'data' parameter must point to at least rowBytes*floor(bounds.size.height) bytes.
+ * The 'bounds' parameter has the following behavior:
+ * The 'bounds' parameter acts to specify the region of 'image' to render.
+ * This region (regardless of its origin) is rendered at upper-left corner of 'data'.
* Passing a 'colorSpace' value of null means:
* Disable output color management if app is linked against iOS SDK
* Disable output color management if app is linked against OSX 10.11 SDK or later
@@ -303,7 +307,7 @@
* point (0,0) of 'image' aligns to the lower left corner of 'buffer'.
* The 'bounds' acts like a clip rect to limit what region of 'buffer' is modified.
* In iOS 8 and earlier: The 'bounds' parameter acts to specify the region of 'image' to render.
- * This region (regarless of its origin) is rendered at upper-left corner of 'buffer'.
+ * This region (regardless of its origin) is rendered at upper-left corner of 'buffer'.
* If 'colorSpace' is nil, CI will not color match to the destination.
*/
- (void)render:(CIImage *)image
@@ -378,6 +382,10 @@
@interface CIContext (ImageRepresentation)
+CORE_IMAGE_EXPORT NSString * const kCIImageRepresentationAVDepthData NS_AVAILABLE(10_13,11_0);
+CORE_IMAGE_EXPORT NSString * const kCIImageRepresentationDepthImage NS_AVAILABLE(10_13,11_0);
+CORE_IMAGE_EXPORT NSString * const kCIImageRepresentationDisparityImage NS_AVAILABLE(10_13,11_0);
+
/* Render a CIImage to TIFF data. Image must have a finite non-empty extent. */
/* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome */
/* and must match the specified CIFormat. */
@@ -389,11 +397,33 @@
/* Render a CIImage to JPEG data. Image must have a finite non-empty extent. */
/* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome. */
-/* Supported options keys are kCGImageDestinationLossyCompressionQuality */
+/* Supported options keys are kCGImageDestinationLossyCompressionQuality, */
+/* kCIImageRepresentationAVDepthData, kCIImageRepresentationDepthImage, */
+/* kCIImageRepresentationDisparityImage. */
- (nullable NSData*) JPEGRepresentationOfImage:(CIImage*)image
colorSpace:(CGColorSpaceRef)colorSpace
options:(NSDictionary*)options NS_AVAILABLE(10_12,10_0);
+/* Render a CIImage to HEIF data. Image must have a finite non-empty extent. */
+/* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome */
+/* and must match the specified CIFormat. */
+/* Supported options keys are kCGImageDestinationLossyCompressionQuality, */
+/* kCIImageRepresentationAVDepthData, kCIImageRepresentationDepthImage, */
+/* kCIImageRepresentationDisparityImage. */
+- (nullable NSData*) HEIFRepresentationOfImage:(CIImage*)image
+ format:(CIFormat)format
+ colorSpace:(CGColorSpaceRef)colorSpace
+ options:(NSDictionary*)options NS_AVAILABLE(10_13,11_0);
+
+/* Render a CIImage to PNG data. Image must have a finite non-empty extent. */
+/* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome */
+/* and must match the specified CIFormat. */
+/* No options keys are supported at this time. */
+- (nullable NSData*) PNGRepresentationOfImage:(CIImage*)image
+ format:(CIFormat)format
+ colorSpace:(CGColorSpaceRef)colorSpace
+ options:(NSDictionary*)options NS_AVAILABLE(10_13,11_0);
+
/* Render a CIImage to TIFF file. Image must have a finite non-empty extent. */
/* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome */
/* and must match the specified CIFormat. */
@@ -405,15 +435,41 @@
options:(NSDictionary*)options
error:(NSError **)errorPtr NS_AVAILABLE(10_12,10_0);
+/* Render a CIImage to PNG file. Image must have a finite non-empty extent. */
+/* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome */
+/* and must match the specified CIFormat. */
+/* No options keys are supported at this time. */
+- (BOOL) writePNGRepresentationOfImage:(CIImage*)image
+ toURL:(NSURL*)url
+ format:(CIFormat)format
+ colorSpace:(CGColorSpaceRef)colorSpace
+ options:(NSDictionary*)options
+ error:(NSError **)errorPtr NS_AVAILABLE(10_13,11_0);
+
/* Render a CIImage to JPEG file. Image must have a finite non-empty extent. */
/* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome. */
-/* Supported options keys are kCGImageDestinationLossyCompressionQuality */
+/* Supported options keys are kCGImageDestinationLossyCompressionQuality, */
+/* kCIImageRepresentationAVDepthData, kCIImageRepresentationDepthImage, */
+/* kCIImageRepresentationDisparityImage. */
- (BOOL) writeJPEGRepresentationOfImage:(CIImage*)image
toURL:(NSURL*)url
colorSpace:(CGColorSpaceRef)colorSpace
options:(NSDictionary*)options
error:(NSError **)errorPtr NS_AVAILABLE(10_12,10_0);
+/* Render a CIImage to HEIF file. Image must have a finite non-empty extent. */
+/* The CGColorSpace must be kCGColorSpaceModelRGB or kCGColorSpaceModelMonochrome */
+/* and must match the specified CIFormat. */
+/* Supported options keys are kCGImageDestinationLossyCompressionQuality, */
+/* kCIImageRepresentationAVDepthData, kCIImageRepresentationDepthImage, */
+/* kCIImageRepresentationDisparityImage. */
+- (BOOL) writeHEIFRepresentationOfImage:(CIImage*)image
+ toURL:(NSURL*)url
+ format:(CIFormat)format
+ colorSpace:(CGColorSpaceRef)colorSpace
+ options:(NSDictionary*)options
+ error:(NSError **)errorPtr NS_AVAILABLE(10_12,10_0);
+
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFeature.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFeature.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFeature.h 2016-09-23 21:00:07.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFeature.h 2017-05-19 22:49:32.000000000 -0400
@@ -19,7 +19,6 @@
@end
-
/** Specifies the type of a feature that is a face. */
CORE_IMAGE_EXPORT NSString* const CIFeatureTypeFace;
/** Specifies the type of a feature that is a rectangle. */
@@ -35,26 +34,26 @@
NS_CLASS_AVAILABLE(10_7, 5_0)
@interface CIFaceFeature : CIFeature
{
- CGRect bounds;
- BOOL hasLeftEyePosition;
- CGPoint leftEyePosition;
- BOOL hasRightEyePosition;
- CGPoint rightEyePosition;
- BOOL hasMouthPosition;
- CGPoint mouthPosition;
-
+ CGRect bounds;
+ BOOL hasLeftEyePosition;
+ CGPoint leftEyePosition;
+ BOOL hasRightEyePosition;
+ CGPoint rightEyePosition;
+ BOOL hasMouthPosition;
+ CGPoint mouthPosition;
+
+
+ BOOL hasTrackingID;
+ int trackingID;
+ BOOL hasTrackingFrameCount;
+ int trackingFrameCount;
- BOOL hasTrackingID;
- int trackingID;
- BOOL hasTrackingFrameCount;
- int trackingFrameCount;
-
- BOOL hasFaceAngle;
- float faceAngle;
-
- BOOL hasSmile;
- BOOL leftEyeClosed;
- BOOL rightEyeClosed;
+ BOOL hasFaceAngle;
+ float faceAngle;
+
+ BOOL hasSmile;
+ BOOL leftEyeClosed;
+ BOOL rightEyeClosed;
}
/** coordinates of various cardinal points within a face.
@@ -106,18 +105,20 @@
@end
-/** A barcode feature found by a CIDetector
+/** A QR code feature found by a CIDetector
All positions are relative to the original image. */
+@class CIQRCodeDescriptor;
+
NS_CLASS_AVAILABLE(10_10, 8_0)
-@interface CIQRCodeFeature : CIFeature
+@interface CIQRCodeFeature : CIFeature <NSSecureCoding, NSCopying>
{
CGRect bounds;
CGPoint topLeft;
CGPoint topRight;
CGPoint bottomLeft;
CGPoint bottomRight;
- NSString* messageString;
+ CIQRCodeDescriptor *symbolDescriptor;
}
@property (readonly) CGRect bounds;
@@ -125,12 +126,14 @@
@property (readonly) CGPoint topRight;
@property (readonly) CGPoint bottomLeft;
@property (readonly) CGPoint bottomRight;
+
#if !defined(SWIFT_CLASS_EXTRA) || (defined(SWIFT_SDK_OVERLAY_COREIMAGE_EPOCH) && SWIFT_SDK_OVERLAY_COREIMAGE_EPOCH >= 2)
@property (nullable, readonly) NSString* messageString;
#else
@property (readonly) NSString* messageString;
#endif
+@property (nullable, readonly) CIQRCodeDescriptor *symbolDescriptor NS_AVAILABLE(10_13, 11_0);
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h 2016-08-06 02:33:42.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImage.h 2017-05-20 00:41:58.000000000 -0400
@@ -15,6 +15,7 @@
NS_ASSUME_NONNULL_BEGIN
@class CIContext, CIFilterShape, CIColor, CIFilter;
+@class AVDepthData;
@protocol MTLTexture;
@@ -36,12 +37,9 @@
CORE_IMAGE_EXPORT CIFormat kCIFormatRGBA8;
CORE_IMAGE_EXPORT CIFormat kCIFormatABGR8 NS_AVAILABLE(10_11, 9_0);
-CORE_IMAGE_EXPORT CIFormat kCIFormatRGBA16 NS_AVAILABLE_MAC(10_4);
-CORE_IMAGE_EXPORT CIFormat kCIFormatRGBAf NS_AVAILABLE(10_4, 7_0);
-
-/* RGBA values that are IEEE 754-2008 half float compliant. */
CORE_IMAGE_EXPORT CIFormat kCIFormatRGBAh NS_AVAILABLE(10_4, 6_0);
-
+CORE_IMAGE_EXPORT CIFormat kCIFormatRGBA16 NS_AVAILABLE(10_4, 10_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatRGBAf NS_AVAILABLE(10_4, 7_0);
CORE_IMAGE_EXPORT CIFormat kCIFormatA8 NS_AVAILABLE(10_11, 9_0);
CORE_IMAGE_EXPORT CIFormat kCIFormatA16 NS_AVAILABLE(10_11, 9_0);
@@ -58,6 +56,16 @@
CORE_IMAGE_EXPORT CIFormat kCIFormatRGh NS_AVAILABLE(10_11, 9_0);
CORE_IMAGE_EXPORT CIFormat kCIFormatRGf NS_AVAILABLE(10_11, 9_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatL8 NS_AVAILABLE(10_12, 10_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatL16 NS_AVAILABLE(10_12, 10_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatLh NS_AVAILABLE(10_12, 10_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatLf NS_AVAILABLE(10_12, 10_0);
+
+CORE_IMAGE_EXPORT CIFormat kCIFormatLA8 NS_AVAILABLE(10_12, 10_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatLA16 NS_AVAILABLE(10_12, 10_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatLAh NS_AVAILABLE(10_12, 10_0);
+CORE_IMAGE_EXPORT CIFormat kCIFormatLAf NS_AVAILABLE(10_12, 10_0);
+
/* Image options dictionary keys.
These keys can be passed with appropriate values to the methods:
@@ -71,6 +79,10 @@
* If [NSNull null] then dont color manage the image. */
CORE_IMAGE_EXPORT NSString * const kCIImageColorSpace;
+/* A boolean value specifying whether the image should sampled using "nearest neighbor"
+ * behavior. If not specified, the image will be sampled using "linear sampling" */
+CORE_IMAGE_EXPORT NSString * const kCIImageNearestSampling NS_AVAILABLE(10_13, 11_0);
+
/* A NSDictionary of metadata properties to pass to CIImage initialization methods.
* When used with imageWithCGImage:options:, initWithCGImage:options:, imageWithData:options:, initWithData:options:
@@ -83,6 +95,17 @@
CORE_IMAGE_EXPORT NSString * const kCIImageTextureFormat NS_AVAILABLE_MAC(10_9);
+/* The kCIImageAuxiliaryDepth or kCIImageAuxiliaryDisparity keys can be passed to the methods:
+ + [CIImage imageWithContentsOfURL:options:]
+ + [CIImage imageWithData:options:]
+ If the value of one of these keys is @YES, the auxiliary image be return instead of the primary image.
+ If an auxiliary image is not present, then nil will be returned.
+ The returned image will be a half float monochrome image.
+ */
+CORE_IMAGE_EXPORT NSString * const kCIImageAuxiliaryDepth NS_AVAILABLE(10_13, 11_0);
+CORE_IMAGE_EXPORT NSString * const kCIImageAuxiliaryDisparity NS_AVAILABLE(10_13, 11_0);
+
+
/* Creates a new image from the contents of 'image'. */
+ (CIImage *)imageWithCGImage:(CGImageRef)image;
+ (CIImage *)imageWithCGImage:(CGImageRef)image
@@ -123,7 +146,9 @@
flipped:(BOOL)flipped
options:(nullable NSDictionary<NSString *,id> *)options NS_AVAILABLE_MAC(10_9);
-// imageWithMTLTexture will return nil if textureType is not MTLTextureType2D.
+/* Creates a new image referencing the contents of the Metal texture object.
+ * The texture type must be MTLTextureType2D and the texture format must be unsigned normalized or floating-point.
+ * When rendering a CIImage referencing this Metal texture, there should not be any uncommitted Metal comand buffers writing to the texture. */
#if !defined(SWIFT_CLASS_EXTRA) || (defined(SWIFT_SDK_OVERLAY_COREIMAGE_EPOCH) && SWIFT_SDK_OVERLAY_COREIMAGE_EPOCH >= 2)
+ (nullable CIImage *)imageWithMTLTexture:(id<MTLTexture>)texture
options:(nullable NSDictionary<NSString *,id> *)options NS_AVAILABLE(10_11, 9_0);
@@ -295,6 +320,13 @@
/* Return a new image by changing the recevier's properties. */
- (CIImage *)imageBySettingProperties:(NSDictionary*)properties NS_AVAILABLE(10_12, 10_0);
+/* Returns a new image by changing the receiver's sample mode to bilinear interpolation. */
+- (CIImage *)imageBySamplingLinear NS_AVAILABLE(10_13, 11_0)
+ NS_SWIFT_NAME(samplingLinear());
+
+/* Returns a new image by changing the receiver's sample mode to nearest neighbor. */
+- (CIImage *)imageBySamplingNearest NS_AVAILABLE(10_13, 11_0)
+ NS_SWIFT_NAME(samplingNearest());
/* Return a rect the defines the bounds of non-(0,0,0,0) pixels */
@property (NS_NONATOMIC_IOSONLY, readonly) CGRect extent;
@@ -324,6 +356,10 @@
* Otherwise this property will be nil and calling [CIContext createCGImage:fromRect:] is recommended. */
@property (nonatomic, readonly, nullable) CGImageRef CGImage NS_AVAILABLE(10_12,10_0);
+/* Returns a AVDepthData if the CIImage was created with [CIImage imageWithData] or [CIImage imageWithURL] and.
+ * one the options kCIImageAuxiliaryDepth or kCIImageAuxiliaryDisparity. */
+@property (nonatomic, readonly, nullable) AVDepthData *depthData NS_AVAILABLE(10_13,11_0);
+
/* Returns the rectangle of 'image' that is required to render the
* rectangle 'rect' of the receiver. This may return a null rect. */
- (CGRect)regionOfInterestForImage:(CIImage *)image
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImageProcessor.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImageProcessor.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImageProcessor.h 2016-08-12 00:56:42.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIImageProcessor.h 2017-05-19 22:49:32.000000000 -0400
@@ -82,6 +82,16 @@
+(CIFormat)outputFormat;
#endif
+// Override this class property if your processor's output stores 1.0 into the
+// alpha channel of all pixels within the output extent.
+// If not overridden, false is returned.
+//
+#if __has_feature(objc_class_property)
+@property (class, readonly) bool outputIsOpaque NS_AVAILABLE(10_13, 11_0);
+#else
++ (bool)outputIsOpaque NS_AVAILABLE(10_13, 11_0);
+#endif
+
// Override this class property to return false if you want your processor to be given
// CIImageProcessorInput objects that have not been synchonized for CPU access.
//
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernel.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernel.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernel.h 2016-08-12 00:56:42.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernel.h 2017-05-19 22:49:32.000000000 -0400
@@ -4,6 +4,7 @@
All rights reserved. */
#import <CoreImage/CoreImageDefines.h>
+#import <CoreImage/CIImage.h>
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@@ -28,7 +29,7 @@
* CIKernel is an object that encapsulates a Core Image Kernel Language
* routine that generates a new images based on input images and agruments.
*
- * General kernels functions are declared akin to this example:
+ * General kernel functions are declared akin to this example:
* kernel vec4 myColorKernel (sampler fore, sampler back, vec4 params)
*
* The function must take a sampler argument for each input image.
@@ -60,6 +61,21 @@
*/
+ (nullable instancetype)kernelWithString:(NSString *)string NS_AVAILABLE(10_10, 8_0);
+/* The data argument should represent a metallib file compiled with the Core Image Standard Library
+ * and contain the given function written in the Metal Shading Language.
+ *
+ * An optional output pixel format can be specified, and would be used if the output of the kernel
+ * needs to be written to an intermediate texture.
+ */
++ (nullable instancetype)kernelWithFunctionName:(NSString *)name
+ fromMetalLibraryData:(NSData *)data
+ error:(NSError **)error NS_AVAILABLE(10_13, 11_0);
+
++ (nullable instancetype)kernelWithFunctionName:(NSString *)name
+ fromMetalLibraryData:(NSData *)data
+ outputPixelFormat:(CIFormat)format
+ error:(NSError **)error NS_AVAILABLE(10_13, 11_0);
+
/* The name of the kernel. */
@property (atomic, readonly) NSString *name NS_AVAILABLE(10_4, 8_0);
@@ -107,7 +123,7 @@
* CIColorKernel is an object that encapsulates a Core Image Kernel Language
* routine that processes only the color information in images.
*
- * Color kernels functions are declared akin to this example:
+ * Color kernel functions are declared akin to this example:
* kernel vec4 myColorKernel (__sample fore, __sample back, vec4 params)
*
* The function must take a __sample argument for each input image.
@@ -146,7 +162,7 @@
* CIWarpKernel is an object that encapsulates a Core Image Kernel Language
* function that processes only the geometry of an image.
*
- * Warp kernels functions are declared akin to this example:
+ * Warp kernel functions are declared akin to this example:
* kernel vec2 myWarpKernel (vec4 params)
*
* Additional arguments can be of type float, vec2, vec3, vec4.
@@ -188,4 +204,87 @@
arguments:(nullable NSArray<id> *)args;
@end
+
+/* CIBlendKernel is a special type of color kernel that blends two images.
+ *
+ * Blend kernel functions are declared akin to this example:
+ * kernel vec4 myBlendKernel (__sample fore, __sample back)
+ *
+ * A blend kernel function must have exactly two arguments of type __sample.
+ * The first argument represents the value of the source pixel and the second
+ * represents that of the old destination. The vec4 returned by the kernel will
+ * be the new destination color.
+ * The kernel should not call sample(), sampleCoord(), or samplerTransform().
+ * The function must return a vec4 pixel color.
+ */
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIBlendKernel : CIColorKernel
+{
+}
+
+/* The string argument should contain a program with one custom blend kernel. */
++ (nullable instancetype)kernelWithString:(NSString *)string;
+
+/* Core Image builtin blend kernels */
+
+/* Component-wise operators */
+
+@property (class, strong, readonly) CIBlendKernel *componentAdd;
+@property (class, strong, readonly) CIBlendKernel *componentMultiply;
+@property (class, strong, readonly) CIBlendKernel *componentMin;
+@property (class, strong, readonly) CIBlendKernel *componentMax;
+
+/* Porter Duff
+ * http://dl.acm.org/citation.cfm?id=808606
+ */
+@property (class, strong, readonly) CIBlendKernel *clear;
+@property (class, strong, readonly) CIBlendKernel *source;
+@property (class, strong, readonly) CIBlendKernel *destination;
+@property (class, strong, readonly) CIBlendKernel *sourceOver;
+@property (class, strong, readonly) CIBlendKernel *destinationOver;
+@property (class, strong, readonly) CIBlendKernel *sourceIn;
+@property (class, strong, readonly) CIBlendKernel *destinationIn;
+@property (class, strong, readonly) CIBlendKernel *sourceOut;
+@property (class, strong, readonly) CIBlendKernel *destinationOut;
+@property (class, strong, readonly) CIBlendKernel *sourceAtop;
+@property (class, strong, readonly) CIBlendKernel *destinationAtop;
+@property (class, strong, readonly) CIBlendKernel *exclusiveOr;
+
+/* PDF 1.7 blend modes
+ * http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf
+ */
+
+/* Standard separable blend modes */
+@property (class, strong, readonly) CIBlendKernel *multiply;
+@property (class, strong, readonly) CIBlendKernel *screen;
+@property (class, strong, readonly) CIBlendKernel *overlay;
+@property (class, strong, readonly) CIBlendKernel *darken;
+@property (class, strong, readonly) CIBlendKernel *lighten;
+@property (class, strong, readonly) CIBlendKernel *colorDodge;
+@property (class, strong, readonly) CIBlendKernel *colorBurn;
+@property (class, strong, readonly) CIBlendKernel *hardLight;
+@property (class, strong, readonly) CIBlendKernel *softLight;
+@property (class, strong, readonly) CIBlendKernel *difference;
+@property (class, strong, readonly) CIBlendKernel *exclusion;
+
+/* Standard nonseparable blend modes */
+@property (class, strong, readonly) CIBlendKernel *hue;
+@property (class, strong, readonly) CIBlendKernel *saturation;
+@property (class, strong, readonly) CIBlendKernel *color;
+@property (class, strong, readonly) CIBlendKernel *luminosity;
+
+/* Additional blend modes */
+@property (class, strong, readonly) CIBlendKernel *subtract;
+@property (class, strong, readonly) CIBlendKernel *divide;
+@property (class, strong, readonly) CIBlendKernel *linearBurn;
+@property (class, strong, readonly) CIBlendKernel *linearDodge;
+@property (class, strong, readonly) CIBlendKernel *vividLight;
+@property (class, strong, readonly) CIBlendKernel *linearLight;
+@property (class, strong, readonly) CIBlendKernel *pinLight;
+@property (class, strong, readonly) CIBlendKernel *hardMix;
+@property (class, strong, readonly) CIBlendKernel *darkerColor;
+@property (class, strong, readonly) CIBlendKernel *lighterColor;
+
+@end
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernelMetalLib.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernelMetalLib.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernelMetalLib.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIKernelMetalLib.h 2017-05-22 01:16:12.000000000 -0400
@@ -0,0 +1,103 @@
+//
+// Extensions to Metal Shading Language for Core Image Kernels
+//
+// Copyright (c) 2017 Apple, Inc. All rights reserved.
+//
+
+#if __METAL_MACOS__ || __METAL_IOS__
+
+#include <metal_stdlib>
+
+namespace coreimage
+{
+ using namespace metal;
+
+ typedef float4 sample_t;
+
+ //MARK: - Sampler
+
+ typedef struct
+ {
+ // Returns the pixel value produced from sampler at the position p, where p is specified in sampler space.
+ float4 sample(float2 p) const;
+
+ // Returns the position in the coordinate space of the source that is associated with the position defined in working-space coordinates.
+ float2 transform(float2 p) const;
+
+ // Returns the position, in sampler space, of the sampler that is associated with the current output pixel (that is, after any transformation matrix
+ // associated with sampler is applied). The sample space refers to the coordinate space of that you are texturing from. Note that if your source data is tiled,
+ // the sample coordinate will have an offset (dx/dy). You can convert a destination location to the sampler location using the transform function.
+ float2 coord() const;
+
+ // Returns the extent of the sampler in world coordinates, as a four-element vector [x, y, width, height].
+ float4 extent() const;
+
+ inline float2 origin() const { return extent().xy; }
+ inline float2 size() const { return extent().zw; }
+
+ private:
+ texture2d<float, access::sample> t;
+ sampler s;
+ constant float4x4& m;
+ float2 dc;
+
+ } sampler;
+
+ // Global equivalents of sampler struct member functions, to facilitate porting of non-Metal legacy CI kernels.
+
+ // Equivalent to src.sample(p)
+ float4 sample (sampler src, float2 p);
+
+ // Equivalent to src.transform(p)
+ float2 samplerTransform (sampler src, float2 p);
+
+ // Equivalent to src.coord()
+ float2 samplerCoord (sampler src);
+
+ // Equivalent to src.extent()
+ float4 samplerExtent (sampler src);
+
+ // Equivalent to src.origin()
+ float2 samplerOrigin (sampler src);
+
+ // Equivalent to src.size()
+ float2 samplerSize (sampler src);
+
+ //MARK: - Destination
+
+ typedef struct
+ {
+ // Returns the position, in working space coordinates, of the pixel currently being computed.
+ // The destination space refers to the coordinate space of the image you are rendering.
+ inline float2 coord() const { return c; }
+
+ private:
+ float2 c;
+
+ } destination;
+
+ //MARK: - Common Functions
+
+ float4 premultiply(float4 s);
+ float4 unpremultiply(float4 s);
+
+ float3 srgb_to_linear(float3 s);
+ float3 linear_to_srgb(float3 s);
+
+ //MARK: - Relational Functions
+
+ // for each component, returns x < 0 ? y : z
+ float compare(float x, float y, float z);
+ float2 compare(float2 x, float2 y, float2 z);
+ float3 compare(float3 x, float3 y, float3 z);
+ float4 compare(float4 x, float4 y, float4 z);
+
+ //MARK: - Math Functions
+
+ float2 cossin(float x);
+ float2 sincos(float x);
+}
+
+namespace ci = coreimage;
+
+#endif /* __METAL_MACOS__ || __METAL_IOS__ */
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRAWFilter.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRAWFilter.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRAWFilter.h 2017-02-17 19:13:08.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRAWFilter.h 2017-05-22 01:16:12.000000000 -0400
@@ -104,6 +104,9 @@
/** NSNumber (double) : The amount of noise reduction applied. Range is 0 to 1. */
CORE_IMAGE_EXPORT NSString *const kCIInputNoiseReductionAmountKey NS_AVAILABLE(10_7, 10_0);
+/** NSNumber (double) : The amount of moire reduction applied. Range is 0 to 1. */
+CORE_IMAGE_EXPORT NSString *const kCIInputMoireAmountKey NS_AVAILABLE(10_13, 11_0);
+
/** NSNumber (BOOL) : Determines if the default vendor lens correction be on. default = YES if raw image used for initialization contains lens distortion parameters. */
CORE_IMAGE_EXPORT NSString *const kCIInputEnableVendorLensCorrectionKey NS_AVAILABLE(10_10, 10_0);
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRenderDestination.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRenderDestination.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRenderDestination.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIRenderDestination.h 2017-05-23 01:18:58.000000000 -0400
@@ -0,0 +1,278 @@
+/*
+ CoreImage - CIRenderDestination.h
+
+ Copyright (c) 2017 Apple, Inc.
+ All rights reserved.
+ */
+
+
+#import <Foundation/Foundation.h>
+#import <CoreImage/CoreImageDefines.h>
+#import <CoreImage/CIImage.h>
+#import <CoreImage/CIContext.h>
+#import <CoreImage/CIKernel.h>
+#import <CoreVideo/CoreVideo.h>
+#if !TARGET_OS_SIMULATOR
+#import <IOSurface/IOSurfaceObjC.h>
+#endif
+#import <Metal/MTLPixelFormat.h>
+
+@protocol MTLTexture, MTLCommandBuffer;
+
+NS_ASSUME_NONNULL_BEGIN
+
+
+// This is a lightweight API to allow clients to specify all the
+// attributes of a render that pertain to the render's destination.
+// It is intended to be used for issuing renders that return to the
+// caller as soon as all the work has been issued but before it completes/
+//
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIRenderDestination : NSObject
+{
+ void *_priv;
+}
+
+// MARK: PixelBuffer destinations
+
+// Create a CIRenderDestination based on a CVPixelBufferRef object.
+//
+// The destination's 'colorspace' property will default a CGColorSpace created by,
+// querying the CVPixelBufferRef attributes.
+//
+- (instancetype) initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer;
+
+// MARK: Surface destinations
+
+#if !TARGET_OS_SIMULATOR
+// Create a CIRenderDestination based on an IOSurface object.
+//
+// The destination's 'colorspace' property will default a CGColorSpace created by,
+// querying the IOSurface attributes.
+//
+- (instancetype) initWithIOSurface:(IOSurface*)surface;
+#endif
+
+// MARK: Metal destinations
+
+// A render to a MTLTexture-backed CIRenderDestination is only supported by MTLTexture-backed CIContexts.
+// The texture must have a MTLTextureType of MTLTextureType2D
+//
+// An optional MTLCommandBuffer can be specified, with which to use for rendering to the MTLTexture.
+//
+// The destination's 'colorspace' property will default a CGColorSpace created with kCGColorSpaceSRGB,
+// kCGColorSpaceExtendedSRGB, or kCGColorSpaceGenericGrayGamma2_2.
+//
+- (instancetype) initWithMTLTexture:(id<MTLTexture>)texture
+ commandBuffer:(nullable id<MTLCommandBuffer>)commandBuffer;
+
+// Create a CIRenderDestination based on a Metal texture.
+//
+// Rendering to a MTLTexture-backed CIRenderDestination is only supported by MTLTexture-backed CIContexts.
+// The provider 'block' will be called lazily when the destination is rendered to.
+// The block must return a texture with a MTLTextureType of MTLTextureType2D.
+// The 'width', 'height' and 'pixelFormat' argument values should be the same as the
+// width, height and pixelFormat of the MTLTexture that will be returned by 'block'
+//
+// An optional MTLCommandBuffer can be specified, with which to use for rendering to the MTLTexture.
+//
+// The destination's 'colorspace' property will default a CGColorSpace created with kCGColorSpaceSRGB,
+// kCGColorSpaceExtendedSRGB, or kCGColorSpaceGenericGrayGamma2_2.
+//
+- (instancetype) initWithWidth:(NSUInteger)width
+ height:(NSUInteger)height
+ pixelFormat:(MTLPixelFormat)pixelFormat
+ commandBuffer:(nullable id<MTLCommandBuffer>)commandBuffer
+ mtlTextureProvider:(id<MTLTexture> (^)(void))block;
+
+// MARK: OpenGL destination
+
+// Create a CIRenderDestination based on an OpenGL texture.
+//
+// Rendering to a GLTexture-backed CIRenderDestination is only supported by GLContext-backed CIContexts.
+// The texture id must be bound to a GLContext that is shared with that of the GLContext-backed CIContext.
+//
+// The destination's 'colorspace' property will default a CGColorSpace created with kCGColorSpaceSRGB,
+// kCGColorSpaceExtendedSRGB, or kCGColorSpaceGenericGrayGamma2_2.
+//
+- (instancetype) initWithGLTexture:(unsigned int)texture
+ target:(unsigned int)target // GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_EXT
+ width:(NSUInteger)width
+ height:(NSUInteger)height;
+
+// MARK: Bitmap data destination
+
+// Create a CIRenderDestination based on client-managed buffer.
+//
+// The 'data' parameter must point to a buffer that is at least bytesPerRow * height bytes in size.
+//
+// The destination's 'colorspace' property will default a CGColorSpace created with kCGColorSpaceSRGB,
+// kCGColorSpaceExtendedSRGB, or kCGColorSpaceGenericGrayGamma2_2.
+- (instancetype) initWithBitmapData:(void *)data
+ width:(NSUInteger)width
+ height:(NSUInteger)height
+ bytesPerRow:(NSUInteger)bytesPerRow
+ format:(CIFormat)format;
+
+
+// MARK: Properties
+
+@property (readonly) NSUInteger width;
+@property (readonly) NSUInteger height;
+
+
+typedef NS_ENUM(NSUInteger, CIRenderDestinationAlphaMode) {
+ CIRenderDestinationAlphaNone = 0,
+ CIRenderDestinationAlphaPremultiplied = 1,
+ CIRenderDestinationAlphaUnpremultiplied = 2
+};
+
+// This property will defualt to an appropriate value given
+// the object that the CIRenderDestination was initialized with.
+// This property can be set to a different value if desired.
+@property CIRenderDestinationAlphaMode alphaMode;
+
+// The logical coordinate system of a CIRenderDestination is always cartesian:
+// (0,0) represents the lower-left corner
+// (0.5,0.5) represents the lower-left pixel center
+// (pixelsWide-0.5,pixelsHigh-0.5) represents the upper-right pixel center
+// (pixelsWide,pixelsHigh) represents the upper-right corner.
+//
+// The 'flipped' property controls how pixels this logical coordinate system
+// are stored into the memory of the object backing the destination.
+//
+// If 'flipped' is false, then the base address of the backing stores the
+// pixel centered on the logical coordinate (0.5,0.5)
+//
+// If 'flipped' is true, then the base address of the backing stores the
+// pixel centered on the logical coordinate (pixelsWide-0.5,0.5)
+//
+@property (getter=isFlipped) BOOL flipped;
+
+// Instructs the render to add pseudo-random luma noise given the depth of the destination.
+// The magnitude of the noise is approximatly ±pow(2,-(bitPerComponent+1))
+@property (getter=isDithered) BOOL dithered;
+
+// If true, the render will clamp color channels
+// to 0..alpha if 'alphaMode' is premultiplied otherwise 0..1
+// This property is initialized to false if the destination's format supports extended range
+@property (getter=isClamped) BOOL clamped;
+
+// This property will defualt to an appropriate value given
+// the object that the CIRenderDestination was initialized with.
+// This property can be set to a different colorSpace if desired.
+// This property can be set to nil to disable color matching
+// from the working space to the destination.
+@property (nullable, nonatomic) CGColorSpaceRef colorSpace;
+
+// Allow client to specify a CIBlendKernel (e.g. CIBlendKernel.sourceOver)
+// to be used on the destination.
+// Currently the blendKernel cannot be set if 'alphaMode' is unpremultiplied
+@property (nullable, nonatomic, retain) CIBlendKernel* blendKernel;
+
+// If true, then the blendKernel is applied in the destination's colorSpace.
+// If false, then the blendKernel is applied in the CIContext's working colorspace.
+// This is false by default.
+@property BOOL blendsInDestinationColorSpace;
+
+@end
+
+
+// An Xcode quicklook of this object will show a graph visualization of the render
+// with detailed timing information.
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIRenderInfo : NSObject
+{
+ void *_priv;
+}
+
+// This property will return how many passes the render requires.
+// If passCount is 1 than the render can be fully concatinated and no
+// intermediate buffers will be required.
+@property (readonly) NSInteger passCount;
+
+// This property will return how much time a render spent executing kernels.
+@property (readonly) NSTimeInterval kernelExecutionTime;
+
+// This property will return how many pixels a render produced executing kernels.
+@property (readonly) NSInteger kernelPixelsProcessed;
+
+@end
+
+
+
+// An Xcode quicklook of this object will show a graph visualization of the render
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface CIRenderTask : NSObject
+{
+ void *_priv;
+}
+
+- (nullable CIRenderInfo*) waitUntilCompletedAndReturnError:(NSError**)error;
+
+@end
+
+
+@interface CIContext (CIRenderDestination)
+
+// Renders a portion of image to a point of destination
+// It renders as if 'image' is cropped to 'fromRect'
+// and the origin of the result is placed at 'atPoint'
+//
+// If image.extent and fromRect are infinite, then it renders
+// so that point (0,0) of image is placed at 'atPoint'
+//
+// MTLTexture-backed CIRenderDestinations are only supported by MTLTexture-backed CIContexts.
+// GLTexture-backed CIRenderDestinations are only supported by GLContext-backed CIContexts.
+//
+// This call will return as soon as all the work for the render is enqueued on the
+// context's device.
+//
+// In many situations, after issuing a render, the client can use the destination
+// or its backing object without waiting for the enqueued work to complete.
+// For example, after rendering a surface CIRenderDestination, the surface can be passed
+// on for further processing by the GPU.
+//
+// In other situations, the client may need to wait for the render to be complete.
+// For example, after rendering a surface CIRenderDestination, the surface can be accessed
+// by CPU code by calling IOSurfaceGetBytePointer only after the render is completed.
+//
+// In this case the client can use the returned CIRenderTask like this:
+// CIRenderTask* task = [context render:...];
+// [task waitUntilCompletedAndReturnError:&error];
+//
+- (nullable CIRenderTask*) startTaskToRender:(CIImage*)image
+ fromRect:(CGRect)fromRect
+ toDestination:(CIRenderDestination*)destination
+ atPoint:(CGPoint)atPoint
+ error:(NSError**)error NS_AVAILABLE(10_13, 11_0);
+
+// Renders an image to a destination so that point (0,0) of image.
+// is placed at point (0,0) of the destination.
+//
+- (nullable CIRenderTask*) startTaskToRender:(CIImage*)image
+ toDestination:(CIRenderDestination*)destination
+ error:(NSError**)error NS_AVAILABLE(10_13, 11_0);
+
+
+// This is an optional call which can be used to "warm up" a CIContext so that
+// a subsequent call to render with the same arguments can be more efficient.
+// By making this call, Core Image will ensure that
+// - any needed kernels will be compiled
+// - any intermedate buffers are allocated and marked volatile
+//
+- (BOOL) prepareRender:(CIImage*)image
+ fromRect:(CGRect)fromRect
+ toDestination:(CIRenderDestination*)destination
+ atPoint:(CGPoint)atPoint
+ error:(NSError**)error NS_AVAILABLE(10_13, 11_0);
+
+// Fill the entire destination with black (0,0,0,1) if its alphaMode is None
+// or clear (0,0,0,0) if its alphaMode is Premultiplied or Unpremultiplied.
+//
+- (nullable CIRenderTask*) startTaskToClear:(CIRenderDestination*)destination
+ error:(NSError**)error NS_AVAILABLE(10_13, 11_0);
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.apinotes 2017-05-22 01:16:12.000000000 -0400
@@ -0,0 +1,36 @@
+Name: CoreImage
+SwiftVersions:
+- Version: 3
+ Classes:
+ - Name: CIColor
+ Properties:
+ - Name: blackColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: whiteColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: grayColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: redColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: greenColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: blueColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: cyanColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: magentaColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: yellowColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
+ - Name: clearColor
+ PropertyKind: Class
+ SwiftImportAsAccessors: true
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h 2016-08-12 00:56:42.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h 2017-05-22 01:16:12.000000000 -0400
@@ -25,9 +25,17 @@
#import <CoreImage/CIFilterShape.h>
#import <CoreImage/CISampler.h>
#import <CoreImage/CIRAWFilter.h>
+#import <CoreImage/CIRenderDestination.h>
+#import <CoreImage/CIBarcodeDescriptor.h>
#if !TARGET_OS_IPHONE
#import <CoreImage/CIFilterGenerator.h>
#import <CoreImage/CIPlugIn.h>
#endif
#endif /* __OBJC__ */
+
+#if __METAL_MACOS__ || __METAL_IOS__
+
+#import <CoreImage/CIKernelMetalLib.h>
+
+#endif /* __METAL_MACOS__ || __METAL_IOS__ */