@interface FWImageResponseSerializer : FWHTTPResponseSerializer
FWImageResponseSerializer is a subclass of
FWHTTPResponseSerializer that validates and decodes image responses.
FWImageResponseSerializer accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage:
The scale factor used when interpreting the image data to construct
responseImage. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance.
@property (nonatomic) CGFloat imageScale;
Whether to automatically inflate response image data for compressed formats (such as PNG or JPEG). Enabling this can significantly improve drawing performance on iOS when used with
setCompletionBlockWithSuccess:failure:, as it allows a bitmap representation to be constructed in the background rather than on the main thread.
@property (nonatomic) BOOL automaticallyInflatesResponseImage;