MPSImageConversion(3) MetalPerformanceShaders.framework MPSImageConversion(3)

MPSImageConversion

#import <MPSImageConversion.h>

Inherits MPSUnaryImageKernel.


(nonnull instancetype) - initWithDevice:srcAlpha:destAlpha:backgroundColor:conversionInfo:


MPSAlphaType sourceAlpha
MPSAlphaType destinationAlpha

MPSImageConversions.h MetalPerformanceShaders.framework

Copyright:

Copyright (c) 2015 Apple Inc. All rights reserved. MetalPerformanceShaders conversion filters MPS_CLASS_AVAILABLE_STARTING

The MPSImageConversion filter performs a conversion from source to destination

- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(MPSAlphaType) srcAlpha(MPSAlphaType) 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.

Parameters:

device The device the filter will run on
srcAlpha The alpha encoding for the source texture
destAlpha The alpha encoding for the destination texture
backgroundColor 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}.
conversionInfo The colorspace conversion to use. May be NULL, indicating no color space conversions need to be done.

Returns:

An initialized MPSImageConversion object.

- destinationAlpha [read], [nonatomic], [assign]

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

- sourceAlpha [read], [nonatomic], [assign]

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

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3