Skip to content

Commit

Permalink
Quiet warnings about alpha constants passed to CGBitmapContextCreate.…
Browse files Browse the repository at this point in the history
… They are documented as being safe, so just cast them to quiet the warning.
  • Loading branch information
danielpunkass authored and Joerg Jacobsen committed Aug 27, 2013
1 parent 74dc9a2 commit 8e5d3c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion IMBLightroomParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,8 @@ - (CGImageRef)imageRotated:(CGImageRef)imgRef forOrientation:(NSInteger)orientat
8,
0,
colorSpace,
kCGImageAlphaPremultipliedFirst);
// CGImageAlphaInfo type documented as being safe to pass in as CGBitmapInfo
(CGBitmapInfo)kCGImageAlphaPremultipliedFirst);
CGColorSpaceRelease(colorSpace);

if (context)
Expand Down
5 changes: 3 additions & 2 deletions IMBiPhotoEventNodeObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ - (CGImageRef) processedImageFromImage:(CGImageRef)inImage
squareSize,
8,
4 * squareSize,
CGImageGetColorSpace(inImage),
kCGImageAlphaPremultipliedLast);
CGImageGetColorSpace(inImage),
// CGImageAlphaInfo type documented as being safe to pass in as CGBitmapInfo
(CGBitmapInfo)kCGImageAlphaPremultipliedLast);
// Fill everything with transparent pixels
CGRect bounds = CGContextGetClipBoundingBox(bitmapContext);
CGContextClearRect(bitmapContext, bounds);
Expand Down

0 comments on commit 8e5d3c0

Please sign in to comment.