Created
October 17, 2013 16:44
-
-
Save hetima/7028237 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSImage* lightImage; | |
| { | |
| lightImage=[[NSImage alloc]initWithSize:[image size]]; | |
| [lightImage lockFocus]; | |
| NSRect rect=NSZeroRect; | |
| rect.size=[image size]; | |
| [image drawAtPoint:NSZeroPoint fromRect:rect operation:NSCompositeCopy fraction:0.4]; | |
| [lightImage unlockFocus]; | |
| } | |
| NSImage* lightImage=({ | |
| NSImage* lightImage=[[NSImage alloc]initWithSize:[image size]]; | |
| [lightImage lockFocus]; | |
| NSRect rect=NSZeroRect; | |
| rect.size=[image size]; | |
| [image drawAtPoint:NSZeroPoint fromRect:rect operation:NSCompositeCopy fraction:0.4]; | |
| [lightImage unlockFocus]; | |
| lightImage; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment