diff --git a/ColorArt/Classes/SLColorArt.m b/ColorArt/Classes/SLColorArt.m index 69e27c8..31e21a8 100644 --- a/ColorArt/Classes/SLColorArt.m +++ b/ColorArt/Classes/SLColorArt.m @@ -233,8 +233,7 @@ - (UIColor*)_findEdgeColor:(UIImage*)image imageColors:(NSArray**)colors NSInteger height = CGImageGetHeight(imageRep); //[imageRep pixelsHigh]; CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB(); - CGContextRef bmContext = CGBitmapContextCreate(NULL, width, height, 8, 4 * width, cs, kCGImageAlphaNoneSkipLast); - CGContextDrawImage(bmContext, (CGRect){.origin.x = 0.0f, .origin.y = 0.0f, .size.width = width, .size.height = height}, image.CGImage); + CGContextRef bmContext = CGBitmapContextCreate(NULL, width, height, 8, 4 * width, cs, (CGBitmapInfo)kCGImageAlphaNoneSkipLast); CGContextDrawImage(bmContext, (CGRect){.origin.x = 0.0f, .origin.y = 0.0f, .size.width = width, .size.height = height}, image.CGImage); CGColorSpaceRelease(cs); const RGBAPixel* pixels = (const RGBAPixel*)CGBitmapContextGetData(bmContext); for (NSUInteger y = 0; y < height; y++)