• 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
Scaling a NSImage not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scaling a NSImage not working


  • Subject: Scaling a NSImage not working
  • From: Development <email@hidden>
  • Date: Wed, 01 Jun 2011 19:19:47 -0700

I'm trying to capture video. In the capture the user can select a specific area to capture out of the full field of the video.
That much functions the problem is that although the image I get has the correct size I cannot figure out how to get that source image to draw in to an NSImage correctly scaled. In other words the video gets all pulled out of it correct aspect...

this is what I have

    NSSize imSize = NSMakeSize(CGImageGetWidth(cgImage), CGImageGetHeight(cgImage));
	NSImage * screenImage = [[NSImage alloc]initWithCGImage:cgImage size:imSize];
    [screenImage setScalesWhenResized:YES];
    [screenImage setSize:movieFrame.size];


I did try the drawInRect:fromRect but that di not produce any better results at all even though I locked the destination rect, filled it with black pixels and then tried the source over composite. Any ideas on what I'm doing wrong here?_______________________________________________

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

  • Follow-Ups:
    • Re: Scaling a NSImage not working
      • From: Development <email@hidden>
  • Prev by Date: Re: Archiving / Unarchiving Question
  • Next by Date: Core Animation: performing a two-step animation
  • Previous by thread: Re: Archiving / Unarchiving Question
  • Next by thread: Re: Scaling a NSImage not working
  • Index(es):
    • Date
    • Thread