MPSImageTypes.h(3) MetalPerformanceShaders.framework MPSImageTypes.h(3)
NAME
MPSImageTypes.h
SYNOPSIS
#import <MPSCore/MPSCoreTypes.h> Typedefs typedef enum MPSAlphaType MPSAlphaType Enumerations enum MPSAlphaType { MPSAlphaTypeNonPremultiplied, MPSAlphaTypeAlphaIsOne, MPSAlphaTypePremultiplied }
Typedef Documentation
typedef enum MPSAlphaType MPSAlphaType"
Enumeration Type Documentation
enum MPSAlphaType Premultiplication description for the color channels of a texture Some image data is premultiplied. That is to say that the color channels are stored instead as color * alpha. This is an optimization for image compositing (alpha blending), but it can get in the way of most other image filters, especially those that apply non-linear affects like the MPSImageParametricCurveTransform multidimensional lookup tables, and functions like convolution or resampling filters that look at adjacent pixels, where the alpha may not be the same. Some basic conversion cases: source destination operation ------ ----------- --------- MPSAlphaTypeNonPremultiplied MPSAlphaTypeNonPremultiplied <none> MPSAlphaTypeNonPremultiplied MPSAlphaTypeAlphaIsOne composite with opaque background color MPSAlphaTypeNonPremultiplied MPSAlphaTypePremultiplied multiply color channels by alpha MPSAlphaTypeAlphaIsOne MPSAlphaTypeNonPremultiplied set alpha to 1 MPSAlphaTypeAlphaIsOne MPSAlphaTypeAlphaIsOne set alpha to 1 MPSAlphaTypeAlphaIsOne MPSAlphaTypePremultiplied set alpha to 1 MPSAlphaTypePremultiplied MPSAlphaTypeNonPremultiplied divide color channels by alpha MPSAlphaTypePremultiplied MPSAlphaTypeAlphaIsOne composite with opaque background color MPSAlphaTypePremultiplied MPSAlphaTypePremultiplied <none> Color space conversion operations require the format to be either MPSPixelAlpha_NonPremultiplied or MPSPixelAlpha_AlphaIsOne to work correctly. A number of MPSKernels have similar requirements. If premultiplied data is provided or requested, extra operations will be added to the conversion to ensure correct operation. Fully opaque images should use MPSAlphaTypeAlphaIsOne. MPSAlphaTypeNonPremultiplied Image is not premultiplied by alpha. Alpha is not guaranteed to be 1. (kCGImageAlphaFirst/Last) MPSAlphaTypeAlphaIsOne Alpha is guaranteed to be 1, even if it is not encoded as 1 or not encoded at all. (kCGImageAlphaNoneSkipFirst/Last, kCGImageAlphaNone) MPSAlphaTypePremultiplied Image is premultiplied by alpha. Alpha is not guaranteed to be 1. (kCGImageAlphaPremultipliedFirst/Last) Enumerator MPSAlphaTypeNonPremultiplied MPSAlphaTypeAlphaIsOne MPSAlphaTypePremultiplied
Author
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code. Version MetalPerformanceShaders-Thu2Jul 13 2017 MPSImageTypes.h(3)
Mac OS X 10.12.6 - Generated Mon Oct 30 18:31:45 CDT 2017