Do not declare NSPasteboardTypePNG.

This commit is contained in:
Damiano Galassi committed 2016-10-12 15:34:23 +02:00
1 parent 8b29f559f5
commit 7dcf857660
1 file changed
+3 -3
+3 -3
View File
@@ -881,15 +881,15 @@ static NSArray<NSArray *> *_mediaKinds;
- (NSUInteger)imageBrowser:(IKImageBrowserView *)aBrowser writeItemsAtIndexes:(NSIndexSet *)itemIndexes toPasteboard:(NSPasteboard *)pasteboard
{
[pasteboard declareTypes:@[SublerCoverArtPBoardType, NSPasteboardTypePNG] owner:nil];
[pasteboard declareTypes:@[SublerCoverArtPBoardType, NSPasteboardTypeTIFF] owner:nil];
for (MP42MetadataItem *item in [self.artworks objectsAtIndexes:itemIndexes]) {
MP42Image *image = item.imageValue;
if (image) {
NSArray *representations = image.image.representations;
if (representations) {
NSData *bitmapData = [NSBitmapImageRep representationOfImageRepsInArray:representations usingType:NSBitmapImageFileTypePNG properties:@{}];
[pasteboard setData:bitmapData forType:NSPasteboardTypePNG];
NSData *bitmapData = [NSBitmapImageRep representationOfImageRepsInArray:representations usingType:NSBitmapImageFileTypeTIFF properties:@{}];
[pasteboard setData:bitmapData forType:NSPasteboardTypeTIFF];
}
[pasteboard setData:[NSKeyedArchiver archivedDataWithRootObject:image] forType:SublerCoverArtPBoardType];
}