Is there a way to initialize ImageKit's IKSaveOptions to default to TIFF with LZW compression?
Posted
by Rei
on Stack Overflow
See other posts from Stack Overflow
or by Rei
Published on 2010-04-27T16:23:06Z
Indexed on
2010/04/28
0:33 UTC
Read the original article
Hit count: 408
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
© Stack Overflow or respective owner