• 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
QTKit and NSImage not playing nice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QTKit and NSImage not playing nice


  • Subject: QTKit and NSImage not playing nice
  • From: "Alan Smith" <email@hidden>
  • Date: Wed, 21 Mar 2007 20:17:40 -0500

Hi all,

I'm trying to create a QTMovie from PDF data. The movie will scroll
down the PDF at a set speed with a set frame height. The only trouble
I'm having is at the end of creating the movie the first frame is
drawn in the upper-left hand corner of my screen. I'm compositing each
image just before adding it to the movie, if I use a file from disk
the odd behavior described above doesn't occur. Why is that???

Any thoughts and suggestions are welcome, this is a real stumper.

Peace, Alan

Here is my code:

for (i = 0; i <= numFrames; i++)
{
	NSLog(@"i = %i", i);

	//NSImage *frame = [[NSImage alloc] initWithContentsOfFile: path to a file];
	NSImage *frame = [[NSImage alloc] initWithSize: frameSize];

	rect = NSMakeRect(0.0, imageYOrigin, frameSize.width, frameSize.height);

	[frame lockFocus];
	[masterImage compositeToPoint: NSMakePoint(0, 0) fromRect: rect
operation: NSCompositeCopy];
	[frame unlockFocus];

	[movie addImage: frame forDuration: curTime withAttributes: imageCompression];
	NSLog(@"Added image");

	[frame release];

	imageYOrigin -= currentSpeed;
}

--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unnecessary, then it
shall evolve."
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: QTKit and NSImage not playing nice
      • From: Michael Watson <email@hidden>
  • Prev by Date: Need help setting up KVO
  • Next by Date: Re: Need help setting up KVO
  • Previous by thread: Re: Need help setting up KVO
  • Next by thread: Re: QTKit and NSImage not playing nice
  • Index(es):
    • Date
    • Thread