Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pikacode committed Nov 13, 2017
1 parent b5c7300 commit beb087c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions EBBannerView/Classes/EBBannerView+Categories.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ +(UIColor *)colorAtPoint:(CGPoint)point{
CGImageRef cgImage = viewImage.CGImage;
NSUInteger width = viewImage.size.width;
NSUInteger height = viewImage.size.height;
viewImage = nil;
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
int bytesPerPixel = 4;
int bytesPerRow = bytesPerPixel * 1;
Expand All @@ -86,6 +87,7 @@ +(UIColor *)colorAtPoint:(CGPoint)point{
CGContextSetBlendMode(context, kCGBlendModeCopy);
CGContextTranslateCTM(context, -pointX, pointY-(CGFloat)height);
CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, (CGFloat)width, (CGFloat)height), cgImage);
UIGraphicsEndImageContext();
CGContextRelease(context);
CGFloat red = (CGFloat)pixelData[0] / 255.0f;
CGFloat green = (CGFloat)pixelData[1] / 255.0f;
Expand Down
Binary file not shown.

0 comments on commit beb087c

Please sign in to comment.