Objective-C API Library Reference  4.3.0-42-g45f162a
 All Classes Functions Typedefs Properties Pages
Public Functions | Public Static Functions | Properties | List of all members
PWEncoderFormat Class Reference

The PWEncoderFormat class specifies image encoder format parameters. By default, these parameters are the image mime type and quality. However, the methods in this class also allow you to specify any other custom parameters that you want to include with the image. Such parameters could be used, for example, to display image metadata.

The service application provides default encoder formats, which get passed to the client applications; therefore, you would only use this class if you wanted to overwrite the defaults provided by the service.

Constructors

(id) - initWithMimeType:quality:
 
(id) - initWithMimeType:parameters:
 
(id) - initWithMimeType:quality:parameters:
 

Public Functions

(NSArray *) - getParameters
 
(NSString *) - getParameterWithName:
 
(id) - initWithMimeType:
 
(BOOL) - isEqual:
 

Public Static Functions

(PWEncoderFormat *) + formatWithMimeType:
 
(PWEncoderFormat *) + formatWithMimeType:parameters:
 
(PWEncoderFormat *) + formatWithMimeType:quality:
 
(PWEncoderFormat *) + formatWithMimeType:quality:parameters:
 

Properties

BOOL isQualitySet
 
NSString * mimeType
 
NSInteger quality
 

Methods Descriptions

+ (PWEncoderFormat *) formatWithMimeType: (NSString *)  mimeType

Creates a format with only mime type set. Quality will not be set and parameters will be empty.

Implemented in PWMutableEncoderFormat.

+ (PWEncoderFormat *) formatWithMimeType: (NSString *)  mimeType
parameters: (NSDictionary *)  parameters 

Creates a format with mime type and parameters set. Quality will not be set.

Implemented in PWMutableEncoderFormat.

+ (PWEncoderFormat *) formatWithMimeType: (NSString *)  mimeType
quality: (NSInteger)  quality 

Creates a format with mime type and quality set. The value for isQualitySet will be true and parameters will be empty.

Implemented in PWMutableEncoderFormat.

+ (PWEncoderFormat *) formatWithMimeType: (NSString *)  mimeType
quality: (NSInteger)  quality
parameters: (NSDictionary *)  parameters 

Creates a new format with mime type, quality and parameters set. The value for isQualitySet will be true.

Implemented in PWMutableEncoderFormat.

- (NSArray *) getParameters

Returns an array of PWEncoderParameter objects indicating all set parameters.

- (NSString *) getParameterWithName: (NSString *)  key

Returns the value of a single parameter based on the given name. Returns nil if the parameter is not set.

- (id) initWithMimeType: (NSString *)  mimeType

Initialize a format with only a mimeType. Quality is not set and parameters are empty

- (id) initWithMimeType: (NSString *)  mimeType
parameters: (NSDictionary *)  parameters 

Initializes a format with mime type and parameters. Quality will not be set.

- (id) initWithMimeType: (NSString *)  mimeType
quality: (NSInteger)  quality 

Initializes a format with mime type and quality. The value for isQualitySet will be true and parameters will be empty.

- (id) initWithMimeType: (NSString *)  mimeType
quality: (NSInteger)  quality
parameters: (NSDictionary *)  parameters 

Initializes a format with mime type, quality, and parameters. The value for isQualitySet will be true.

- (BOOL) isEqual: (id)  other

Compares this encoder format against the specified object. Returns true if they are equal, otherwise returns false.

Properties Descriptions

- (BOOL) isQualitySet
readnonatomicassign

A Boolean value that indicates if the quality is set. If true, the value for quality is valid; if false, the quality property will be ignored. This is relevant as quality does not apply to some encoding formats such as PNG.

- (NSString*) mimeType
readnonatomiccopy

The mime type value of the format.

- (NSInteger) quality
readnonatomicassign

The image encoding quality currently set in the PWEncoderFormat object.