in ios/SpectrumKit/SpectrumKit/Image/FSPImagePixelSpecification.mm [358:378]
FSPImagePixelSpecificationAlphaInfo FSPImagePixelSpecificationAlphaInfoFromImage(UIImage *image)
{
switch (CGImageGetAlphaInfo(image.CGImage)) {
case kCGImageAlphaNone:
return FSPImagePixelSpecificationAlphaInfoNone;
case kCGImageAlphaPremultipliedLast:
return FSPImagePixelSpecificationAlphaInfoPremultipliedLast;
case kCGImageAlphaPremultipliedFirst:
return FSPImagePixelSpecificationAlphaInfoPremultipliedFirst;
case kCGImageAlphaLast:
return FSPImagePixelSpecificationAlphaInfoLast;
case kCGImageAlphaFirst:
return FSPImagePixelSpecificationAlphaInfoFirst;
case kCGImageAlphaNoneSkipLast:
return FSPImagePixelSpecificationAlphaInfoSkipLast;
case kCGImageAlphaNoneSkipFirst:
return FSPImagePixelSpecificationAlphaInfoSkipFirst;
case kCGImageAlphaOnly:
SPECTRUM_ERROR("unsupported_image_pixel_spec_alpha_only");
}
}