|
@@ -4909,10 +4909,10 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
-- (void)menuItemClick_StampExport: (NSMenuItem *)sender{
|
|
|
+- (void)menuItemClick_StampExport: (NSMenuItem *)sender {
|
|
|
+ NSImage *image = nil;
|
|
|
if ([self.activeAnnotation isKindOfClass:[CPDFStampAnnotation class]]) {
|
|
|
CPDFStampAnnotation *annotation = (CPDFStampAnnotation *)self.activeAnnotation;
|
|
|
- NSImage *image = nil;
|
|
|
if ([self.activeAnnotation isKindOfClass:[KMAnnotationStamp class]]) {
|
|
|
image = annotation.stampImage;
|
|
|
}
|
|
@@ -4928,6 +4928,11 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
|
|
|
[[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationDefault];
|
|
|
[image unlockFocus];
|
|
|
}
|
|
|
+ } else if (self.currentSelection.selectionType == CPDFSelectionTypeImage) {
|
|
|
+ image = [self.document extractImageFromPage:self.currentSelection.page imageSelection:self.currentSelection];
|
|
|
+ }
|
|
|
+
|
|
|
+ if (image) {
|
|
|
NSData *data = [image TIFFRepresentation];
|
|
|
NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:data];
|
|
|
[imageRep setSize:[image size]];
|