|
@@ -873,18 +873,18 @@ void CPDFListViewOCDrawLineHandles(CGContextRef context, CGRect rect, CGFloat ra
|
|
|
NSData *data = [image TIFFRepresentation];
|
|
|
NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:data];
|
|
|
[imageRep setSize:[image size]];
|
|
|
- NSBitmapImageFileType type = NSBitmapImageFileTypePNG;
|
|
|
+ NSBitmapImageFileType imageType = NSBitmapImageFileTypePNG;
|
|
|
NSString *typeStr = @"png";
|
|
|
if (type == 0) {
|
|
|
- type = NSBitmapImageFileTypePNG;
|
|
|
+ imageType = NSBitmapImageFileTypePNG;
|
|
|
typeStr = @"png";
|
|
|
} else if (type == 1) {
|
|
|
- type = NSBitmapImageFileTypeJPEG;
|
|
|
+ imageType = NSBitmapImageFileTypeJPEG;
|
|
|
typeStr = @"jpg";
|
|
|
} else if (type == 2) {
|
|
|
[self exportPDF:image];
|
|
|
}
|
|
|
- NSData *imageData = [imageRep representationUsingType:NSBitmapImageFileTypeJPEG properties:@{}];
|
|
|
+ NSData *imageData = [imageRep representationUsingType:imageType properties:@{}];
|
|
|
|
|
|
NSSavePanel *savePanel = [NSSavePanel savePanel];
|
|
|
savePanel.allowedFileTypes = @[typeStr];
|