Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSBundle *thisBundle = [NSBundle mainBundle];
- NSString *imagePath = [thisBundle pathForImageResource:@"testimage.png"];
- image = [[NSImage alloc] initWithContentsOfFile:imagePath];
- NSRect imageRect;
- imageRect.origin = NSZeroPoint;
- imageRect.size = [image size];
- CGFloat zoom = 3.0;
- imageRect.size.width = imageRect.size.width * zoom;
- imageRect.size.height = imageRect.size.height * zoom;
- NSLog(@"%@", image);
- [imageView setFrame:imageRect];
- [imageView setImageScaling:NSScaleProportionally];
- [imageView setImage:image];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement