Skip to content

Commit

Permalink
Fix warning. Cast the bitmapInfo parameter for CGBitmapContextCreate.…
Browse files Browse the repository at this point in the history
… This is safe to do - from docs "The constants for specifying the alpha channel information are declared with the CGImageAlphaInfo type but can be passed to this parameter safely.
  • Loading branch information
PeteC committed Aug 4, 2013
1 parent 608b73e commit 72a89b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SMPageControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ - (CGImageRef)createMaskForImage:(UIImage *)image CF_RETURNS_RETAINED
size_t pixelsWide = image.size.width * image.scale;
size_t pixelsHigh = image.size.height * image.scale;
int bitmapBytesPerRow = (pixelsWide * 1);
CGContextRef context = CGBitmapContextCreate(NULL, pixelsWide, pixelsHigh, CGImageGetBitsPerComponent(image.CGImage), bitmapBytesPerRow, NULL, kCGImageAlphaOnly);
CGContextRef context = CGBitmapContextCreate(NULL, pixelsWide, pixelsHigh, CGImageGetBitsPerComponent(image.CGImage), bitmapBytesPerRow, NULL, (CGBitmapInfo)kCGImageAlphaOnly);
CGContextTranslateCTM(context, 0.f, pixelsHigh);
CGContextScaleCTM(context, 1.0f, -1.0f);

Expand Down

0 comments on commit 72a89b3

Please sign in to comment.