Well, currently I'm using CoreImage
approach because it's simple and fast:
CIImage* ciImage = [CIImage imageWithData:rawData];
CGColorSpaceRef cs = ciImage.colorSpace;
CIImage
doesn't have memory overhead if created with pre-allocated bytes.
It also doesn't have performance overhead if not rendered e.g. with [CIContext render]
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…