Lynkeos
|
Common protocol for all file writers. More...
#import <LynkeosFileWriter.h>
Instance Methods | |
(NSPanel *) | - configurationPanel |
Get a configuration panel for this writer. More... | |
Class Methods | |
(NSString *) | + writerName |
Get a string identifying this writer. More... | |
(NSString *) | + fileExtension |
Get the extension that should be appended to a file name, when written by this reader. More... | |
(BOOL) | + canSaveDataWithPlanes:width:height:metaData: |
Check if this writer is able to save that kind of data. More... | |
(id< LynkeosFileWriter >) | + writerForURL:planes:width:height:metaData: |
Constructor which creates a writer ready for writing some data with the given parameters. More... | |
Common protocol for all file writers.
This protocol is not meant to be directly implemented. It is the common part of more specialized protocols.
+ (BOOL) canSaveDataWithPlanes: | (u_short) | nPlanes | |
width: | (u_short) | w | |
height: | (u_short) | h | |
metaData: | (NSDictionary *) | metaData | |
Check if this writer is able to save that kind of data.
For example: some format only supports monochrome images.
Implementations that do not support metadata can return YES, and ignore the metaData parameter.
nPlanes | The number of color planes to save |
w | The image width |
h | The image height |
metaData | A property list containing image metadata |
- (NSPanel*) configurationPanel |
Get a configuration panel for this writer.
The application calls runModal on this panel, when the call returns with NSOKButton, the writer's configurable parameters are set for writing.
+ (NSString*) fileExtension |
Get the extension that should be appended to a file name, when written by this reader.
+ (id <LynkeosFileWriter>) writerForURL: | (NSURL *) | url | |
planes: | (u_short) | nPlanes | |
width: | (u_short) | w | |
height: | (u_short) | h | |
metaData: | (NSDictionary *) | metaData | |
Constructor which creates a writer ready for writing some data with the given parameters.
Implementations are not required to make use of the arguments, therefore they shall be repeated verbatim in the saveData method.
url | The URL of the file to be saved |
nPlanes | The number of color planes in the image |
w | The image width |
h | The image height |
metaData | The imag metadata |
+ (NSString*) writerName |
Get a string identifying this writer.
This string will be displayed by the application in a menu for choosing the writer.