• 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: Fastest way to resize an image?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fastest way to resize an image?


  • Subject: Re: Fastest way to resize an image?
  • From: "Michael Ash" <email@hidden>
  • Date: Sat, 22 Nov 2008 14:46:23 -0500

On Sat, Nov 22, 2008 at 1:36 PM, Jean-Nicolas Jolivet
<email@hidden> wrote:
> While we're on the subject, I was wondering... does NSBitmapImageRep has an
> equivalent to NSImage's
>
> drawInRect: fromRect: operation: fraction:
>
>
> Problem is... the ImageRep technique works well when I'm just scaling an
> image..it's quite fast too, however I am also cropping (in some cases)...
> and unfortunately, without the "fromRect" parameter, it's pretty much
> impossible to crop... right now I'm drawing my ImageRep in an intermediate
> NSImage so that i can use drawInRect: fromRect: when cropping but it takes
> tons of time (like 2-3x the time it takes by using just an ImageRep...)
> being able to use drawInRect: fromRect  on an ImageRep would save me ton of
> time and headaches...

You can crop any drawing you wish by using the -[NSBezierPath addClip]
method. That NSImage allows you to do it inline is really just a
convenience.

Mike
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Re: Fastest way to resize an image? (From: Heinrich Giesen <email@hidden>)
 >Re: Fastest way to resize an image? (From: Jean-Nicolas Jolivet <email@hidden>)

  • Prev by Date: Re: Testing components within an application
  • Next by Date: Core Animation: How to swicth off all implicit animations?
  • Previous by thread: Re: Fastest way to resize an image?
  • Next by thread: Re: Fastest way to resize an image?
  • Index(es):
    • Date
    • Thread