QTKit and NSImage not playing nice
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