Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ColorArt/Classes/SLColorArt.m
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down