File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 88
99Pod ::Spec . new do |s |
1010 s . name = 'SDWebImagePDFCoder'
11- s . version = '1.0.0 '
11+ s . version = '1.0.1 '
1212 s . summary = 'A PDF coder plugin for SDWebImage, using built-in framework'
1313
1414# This description is used to generate tags and improve search results.
Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ + (NSData *)createPDFDataWithBitmapImage:(UIImage *)image {
206206 return nil ;
207207 }
208208 NSMutableData *pdfData = [NSMutableData data ];
209+
209210 CGDataConsumerRef pdfConsumer = CGDataConsumerCreateWithCFData ((__bridge CFMutableDataRef)pdfData);
210211
211212 CGSize imageSize = CGSizeMake (CGImageGetWidth (imageRef), CGImageGetHeight (imageRef));
@@ -216,7 +217,12 @@ + (NSData *)createPDFDataWithBitmapImage:(UIImage *)image {
216217 CGContextDrawImage (context, mediaBox, imageRef);
217218 CGContextEndPage (context);
218219
219- return [pdfData copy ];
220+ NSData *result = [pdfData copy ];
221+
222+ CGDataConsumerRelease (pdfConsumer);
223+ CGContextRelease (context);
224+
225+ return result;
220226}
221227
222228+ (BOOL )supportsVectorPDFImage {
Original file line number Diff line number Diff line change 1515 <key >CFBundlePackageType </key >
1616 <string >FMWK </string >
1717 <key >CFBundleShortVersionString </key >
18- <string >1.0.0 </string >
18+ <string >1.0.1 </string >
1919 <key >CFBundleVersion </key >
20- <string >1.0.0 </string >
20+ <string >1.0.1 </string >
2121</dict >
2222</plist >
You can’t perform that action at this time.
0 commit comments