On May 9, 2010, at 11:15 AM, Jonathan Chacón wrote:

> I don't know how can I cut a piece of an image and paste it in other image.

Create a new temporary image the size of the selection.
Draw the original image into it, with the source and destination rects set up 
so the selected area is drawn into the temp image.
Write the temp image into your favorite data format; TIFF or PNG are probably 
the best choices.
Reset the general pasteboard, declare that data type, and set the data.

Pasting is basically the reverse. Use -[NSImage initWithPasteboard:] to read 
the pasteboard into an image.

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to