• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: get subimage from an NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get subimage from an NSImage


  • Subject: Re: get subimage from an NSImage
  • From: j o a r <email@hidden>
  • Date: Mon, 8 Nov 2004 13:27:52 +0100


On 2004-11-08, at 13.10, Sebestyén Gábor wrote:

Is there a Cocoa-way to get subimage from an NSImage ( ie. subImage = [anImage subImageWithRect: aRect ] )? I need to clip an image apart to smaller pieces but don't find a way to do it simply.

To summarize the steps in English rather than code:

* Create a new image the size of your subimage
* Lock focus on the new image
* Use "compositeToPoint:fromRect:operation:" on the source image to copy over the image data
* Unlock focus on the new image


j o a r

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: get subimage from an NSImage
      • From: Sebestyén Gábor <email@hidden>
References: 
 >get subimage from an NSImage (From: Sebestyén Gábor <email@hidden>)

  • Prev by Date: get subimage from an NSImage
  • Next by Date: Re: New Spotlight Info
  • Previous by thread: get subimage from an NSImage
  • Next by thread: Re: get subimage from an NSImage
  • Index(es):
    • Date
    • Thread