| | |
| | | if (!data || data.length == 0) { |
| | | return nil; |
| | | } |
| | | // Vector image does not supported, guard firstly |
| | | SDImageFormat format = [NSData sd_imageFormatForImageData:data]; |
| | | if (format == SDImageFormatSVG || format == SDImageFormatPDF) { |
| | | return nil; |
| | | } |
| | | |
| | | id<SDAnimatedImageCoder> animatedCoder = nil; |
| | | SDImageCoderMutableOptions *mutableCoderOptions; |
| | | if (options != nil) { |
| | |
| | | if (!image) { |
| | | return nil; |
| | | } |
| | | // Vector image does not supported, guard secondly |
| | | if (image.sd_isVector) { |
| | | return nil; |
| | | } |
| | | #if SD_MAC |
| | | self = [super initWithCGImage:image.CGImage scale:MAX(scale, 1) orientation:kCGImagePropertyOrientationUp]; |
| | | #else |