.TH "MPSImageConversion" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSImageConversion .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits \fBMPSUnaryImageKernel\fP\&. .SS "Instance Methods" .in +1c .ti -1c .RI "(nonnull instancetype) \- \fBinitWithDevice:srcAlpha:destAlpha:backgroundColor:conversionInfo:\fP" .br .in -1c .SS "Properties" .in +1c .ti -1c .RI "\fBMPSAlphaType\fP \fBsourceAlpha\fP" .br .ti -1c .RI "\fBMPSAlphaType\fP \fBdestinationAlpha\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP MPSImageConversions\&.h MetalPerformanceShaders\&.framework .PP \fBCopyright:\fP .RS 4 Copyright (c) 2015 Apple Inc\&. All rights reserved\&. MetalPerformanceShaders conversion filters MPS_CLASS_AVAILABLE_STARTING .RE .PP The \fBMPSImageConversion\fP filter performs a conversion from source to destination .SH "Method Documentation" .PP .SS "\- (nonnull instancetype) \fBinitWithDevice:\fP (nonnull id< MTLDevice >) device(\fBMPSAlphaType\fP) srcAlpha(\fBMPSAlphaType\fP) destAlpha(nullable CGFloat *) backgroundColor(nullable CGColorConversionInfoRef) conversionInfo" Create a converter that can convert texture colorspace, alpha and texture format Create a converter that can convert texture colorspace, alpha and MTLPixelFormat\&. Optimized cases exist for NULL color space converter and no alpha conversion\&. .PP \fBParameters:\fP .RS 4 \fIdevice\fP The device the filter will run on .br \fIsrcAlpha\fP The alpha encoding for the source texture .br \fIdestAlpha\fP The alpha encoding for the destination texture .br \fIbackgroundColor\fP An array of CGFloats giving the background color to use when flattening an image\&. The color is in the source colorspace\&. The length of the array is the number of color channels in the src colorspace\&. If NULL, use {0}\&. .br \fIconversionInfo\fP The colorspace conversion to use\&. May be NULL, indicating no color space conversions need to be done\&. .RE .PP \fBReturns:\fP .RS 4 An initialized \fBMPSImageConversion\fP object\&. .RE .PP .SH "Property Documentation" .PP .SS "\- destinationAlpha\fC [read]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" Premultiplication description for the destinationAlpha texture Colorspace conversion operations produce non-premultiplied data\&. Use this property to tag cases where premultiplied results are required\&. If MPSPixelAlpha_AlphaIsOne is used, the alpha channel will be set to 1\&. Default: MPSPixelAlpha_AlphaIsOne .SS "\- sourceAlpha\fC [read]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" Premultiplication description for the source texture Most colorspace conversion operations can not work directly on premultiplied data\&. Use this property to tag premultiplied data so that the source texture can be unpremultiplied prior to application of these transforms\&. Default: MPSPixelAlpha_AlphaIsOne .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.