Mailing Lists: Apple Mailing Lists

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

Saving QT files silliness



Hi, I know I'm doing something daft, but can't figure out what it is...

I'm converting a TIFF to a PICT with QuickTime (in a data handle), and afterwards wish to save a copy of the pict to disc. This is what I'm doing... (error checking omitted for clarity - no calls return errors)

GraphicsImportComponent gi=NULL;
GraphicsExportComponent ge=NULL;
err=OpenADefaultComponent(GraphicsImporterComponentType,'TIFF',&gi);
cResult=GraphicsImportSetDataHandle(gi,imageHandle);
err=OpenADefaultComponent(GraphicsExporterComponentType,'PICT',&ge);
err=GraphicsExportSetInputGraphicsImporter(ge,gi);
err=GraphicsExportSetOutputHandle(ge,destImageHandle);
cResult=GraphicsExportDoExport(ge,&bytesWritten);

...where imageHandle is a handle to a buffer filled with the tiff data.
This works beautifully, and destImageHandle has a useable pict in it.

The trouble is, when I try and dump it to a file like so...

FSSpec fs;
err=FSMakeFSSpec(0,0,"\p/Users/ian/Desktop/myPict",&fs); //returns -43
err=GraphicsExportSetOutputFile(ge,&fs);
cResult=GraphicsExportDoExport(ge,&bytesWritten);
CloseComponent(gi);
CloseComponent(ge);

...everything *seems* to be OK, FSMakeFSSpec returns -43 (file not found) the first time round because the file doesn't exist yet, as it should do, (returns zero on subsequent calls) and GraphicsExportSetOutputFile and GraphicsExportDoExport both return zero.
The problem however is that the file is nowhere to be found.

[incidently - the name field of fs holds the full path, shouldn't it be just the final part after the last slash?]

Now, I haven't exactly told you the full story... last week running 10.1.5 this worked perfectly.
Then, we went to 10.2, which was fantastic except non of our dev stuff would work with it (CW8.2, 4th Dimension), so we went back to 10.1.5 again, keeping 10.2 on a separate partition.

Is it because there are (kind of) two /Users/ian/Desktop/ that this is happening?
Any ideas?

TIA
Ian
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.



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.