Our application writes raster files using Export Components. We
offer the user a choice of formats based on the exporters we find by
scanning through using:
ComponentDescription compDesc={GraphicsExporterComponentType, 0,
0, 0, graphicsExporterIsBaseExporter};
Component id=0;
while (0!=(id=FindNextComponent(id, &compDesc)) &&
(noErr==err))
We get details of the format from the component with
err=GraphicsExportGetDefaultFileNameExtension(ci,
&ext);
err=GraphicsExportGetDefaultFileTypeAndCreator(ci, &type, &creator);
and then ask Launch Services for a name to show the user with:
LSCopyKindStringForTypeInfo(type, creator, cfext, &kind);
(cfext can be NULL or a CFStringRef built from ext)
This works well on Jaguar and Tiger, returning distinct names like:
Silicon Graphics Image
Apple PICT Document
Targa Image
Unfortunately on Leopard all the formats except "JPEG 2000 Image"
return "Preview Document"
I have reported rdar://5353626, but wondered if anyone else has
encountered the problem and/or can suggest a workaround.
Thanks
Arvan
--
Arvan Pritchard
Informatix Software International Limited
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden