New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Cocoa combine images?

Post Reply New Thread Subscribe

Thread Tools

Member Since: Jul 02, 2008
Posts: 2
zenox is on a distinguished road

zenox is offline
Im trying to combine two NSImages. Currently I am using the following:

NSImage *newImage = [[NSImage alloc] initWithSize:NSMakeSize(imageBuffer.size.width, imageBuffer.size.height)];

[newImage lockFocus];
[imageBuffer compositeToPoint:NSMakePoint(0,0) operation:NSCompositeSourceOver];
[image compositeToPoint:NSMakePoint(50,50) operation:NSCompositeSourceOver];
[newImage unlockFocus];

Which creates a third image and pastes the other two images into it.
Is their anyway to do this without having to create a new image? (IE just paste the second image onto the first image?) I have tried the following but it did not work:

[imageBuffer lockFocus];
[image compositeToPoint:NSMakePoint(50,50) opeartion:NSCompositeSourceOver];
[imageBuffer unlockFocus];
QUOTE Thanks

Post Reply New Thread Subscribe

« Starting with XCode | Problem with cocoa in xcode 3 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
changing master images in aperture and iphoto nick_harambee OS X - Apps and Games 1 03-30-2007 12:11 AM
importing additional images into a project nick_harambee OS X - Apps and Games 0 03-28-2007 05:49 PM
Legal Use of Web Images CarterSmith Web Design and Hosting 3 01-24-2007 05:28 AM
Getting images to show up in Dreamweaver dziner Web Design and Hosting 4 07-22-2004 04:11 PM
iSight takes still images? kika Images, Graphic Design, and Digital Photography 6 10-17-2003 09:09 PM

All times are GMT -4. The time now is 11:15 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?