Revision: 4266
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4266&view=rev
Author:   hofman
Date:     2008-07-21 11:57:50 +0000 (Mon, 21 Jul 2008)

Log Message:
-----------
allow image as data in skim notes

Modified Paths:
--------------
    trunk/SkimNotes/SKNPDFAnnotationNote.m

Modified: trunk/SkimNotes/SKNPDFAnnotationNote.m
===================================================================
--- trunk/SkimNotes/SKNPDFAnnotationNote.m      2008-07-21 11:34:15 UTC (rev 
4265)
+++ trunk/SkimNotes/SKNPDFAnnotationNote.m      2008-07-21 11:57:50 UTC (rev 
4266)
@@ -72,10 +72,13 @@
         Class attrStringClass = [NSAttributedString class];
         Class stringClass = [NSString class];
         Class imageClass = [NSImage class];
+        Class dataClass = [NSData class];
         NSAttributedString *aText = [dict 
objectForKey:SKNPDFAnnotationTextKey];
         NSImage *anImage = [dict objectForKey:SKNPDFAnnotationImageKey];
         if ([anImage isKindOfClass:imageClass])
             image = [anImage retain];
+        if ([anImage isKindOfClass:dataClass])
+            image = [[NSImage alloc] initWithData:(NSData *)anImage];
         if ([aText isKindOfClass:attrStringClass])
             [self setText:aText];
         else if ([aText isKindOfClass:stringClass])


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to