Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QC recording application



More on QCTV...

I've added a "frame grab" feature to QCTV, and it works fine... except for one really weird problem (unrelated to PPC/Intel).

In FrameMovieExporter.m, in method -exportFrame:timeStamp: (bottom of file),
1) I make a CIImage from the 'frame' variable (a CVPixelBufferRef)
2) Then I make an NSImage from the CIImage
3) Then I write out the NSImage to disk


CIImage *ciImage = [CIImage imageWithCVImageBuffer:frame];
NSImage *nsImage = [ciImage makeNSImage];
[[nsImage TIFFRepresentation] writeToFile:@"/tmp/frame.tiff" atomically:NO];


This all works great, except when I have the video display width set to an exact power of two: 128, 256, 512, 1024, or 2048! When I try to make an NSImage of the frame with these widths, I get diagonal bars (as though the frame is too large, and the scan lines are wrapping). But all widths in between these seem to work perfectly (e.g., 1025, etc.). What is causing this?

Roland

For completeness, below is my CIImage category for method -makeNSImage.

@implementation CIImage (CIImageCategory)
- (NSImage *) makeNSImage
{
    NSImage *image;
    NSCIImageRep *imageRep;
    (CGRect) rect = [self extent];

imageRep = [NSCIImageRep imageRepWithCIImage:self];
image = [[NSImage alloc] initWithSize:NSMakeSize (rect.size.width,rect.size.height)];
[image addRepresentation:imageRep];
return [image autorelease];
}


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >QC recording application (From: Jonathan Hammond <email@hidden>)
 >Re: QC recording application (From: Steven Halford <email@hidden>)
 >Re: QC recording application (From: Alessandro Sabatelli <email@hidden>)
 >Re: QC recording application (From: Steven Halford <email@hidden>)
 >Re: QC recording application (From: Alessandro Sabatelli <email@hidden>)
 >Re: QC recording application (From: Roland Torres <email@hidden>)
 >Re: QC recording application (From: Pierre-Olivier Latour <email@hidden>)
 >Re: QC recording application (From: Roland Torres <email@hidden>)
 >Re: QC recording application (From: Troy Koelling <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.