Newsgroups: comp.sys.mac.programmer
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!captkidd
From: captkidd@athena.mit.edu (Ivan Cavero Belaunde)
Subject: Re: using QuickTime compression
Message-ID: <1991Jun11.181453.7921@athena.mit.edu>
Sender: news@athena.mit.edu (News system)
Organization: Massachusetts Institute of Technology
References: <0B01FFFB.hsyi3b@outpost.UUCP>
Date: Tue, 11 Jun 91 18:14:53 GMT
Lines: 37

In article <0B01FFFB.hsyi3b@outpost.UUCP> peirce@outpost.UUCP (Michael Peirce) writes:
>I tried the following code fragment:
>	cPict = (PicHandle) NewHandle(sizeof(Picture));
>	if ((stat = CompressPicture(rPict,cPict,codecMaxQuality,'jpeg')) != noErr) {
>		NumToString(stat,statStr);
>		DebugStr(statStr);
>	}

The codec type for JPEG compression is 'JPEG', not 'jpeg'. If you look in the
QuickTime extension with ResEdit, you'll find a bunch of 'thng' resources
(Component descriptors). You can get the codectypes for the codecs from there.
The AVC uses 'rpza,' the RLE codec uses 'rle ', and the raw codec uses 'raw '
(original huh?).  There's also a 'SIVQ' decoder in there, and what it does
I have no idea, but the VQ in the name leads me to believe it's a
vector-quantization based codec (or actually, dec, since there's no compressor
in there). Hmmm......

>The one difference between my code and the sample is that rather than
>asking the user for settings, I simply ask for the best that JPEG
>can supply.

Yeah, but they use Apple's standard compression dialog (thanks again, guys.
Way cool.), which I believe scans for all available compressor components
and presents them to you in the popup. It thus gets the right type from the
descriptor itself.

>P.S.  On a related note, I tried to use the documented Gestalt selector
>too, but this always crashed on me.  The code line before was another
>call to Gestalt that worked fine.
>Maybe this really is alpha software :-)

Oh yes. Try running EvenBetterBusError with it ;-)

-Ivan Cavero Belaunde
Digital Video Applications (DiVA) Corp.
Internet: captkidd@ATHENA.MIT.EDU
Disclaimer: opinions, assholes, you know...
