I'm using Mac OS X 10.6 SDK ImageKit's IKSaveOptions to add the file format accessory to an NSSavePanel using:
- (id)initWithImageProperties:(NSDictionary *)imageProperties imageUTType:(NSString *)imageUTType;
and
- (void)addSaveOptionsAccessoryViewToSavePanel:(NSSavePanel *)savePanel;
I have tried creating an NSDictionary to specify Compression = 5, but I cannot seem to get the IKSaveOptions to show Format:TIFF, Compression:LZW when the NSSavePanel first appears. I've also tried saving the returned imageProperties dictionary and the userSelection dictionary, and then tried feeding that back in for the next time, but the NSSavePanel always defaults to Format:TIFF with Compression:None.
Does anyone know how to customize the default format/compression that shows up in the accessory view?
I would like to default the save options to TIFF/LZW and furthermore would like to restore the user's last file format choice for next time. I am able to control the file format using the imageUTType (e.g. kUTTypeJPEG, kUTTypePNG, kUTTypeTIFF, etc) but I am still unable to set the initial compression option for TIFF or JPEG formats.
Thanks,
-Rei
There is no public API to control this. However, you can modify it through accessory view of the NSSavePanel.
Example: