sundsx
sundsx

Reputation: 618

display an image from NSCFDictionary ( osx environment )

Need help for exit from headache... I cant able to show an image retrieve from ID3tag.

My code

         MP3InfoDictionary = (__bridge NSDictionary*)dictRef;
         if (MP3InfoDictionary != NULL) {
          NSLog(@"MP3InfoDictionary APIC %@",[MP3InfoDictionary objectForKey:@"APIC"]);

...this output in console

enter image description here

Question:how can I show the image from dictionary to an NSImage which step I must follow?

I did try every thing without success.

Upvotes: 0

Views: 36

Answers (1)

Hot Licks
Hot Licks

Reputation: 47729

NSDictionary* apic = mp3InfoDictionary[@"APIC"];  // Variables should begin with lower case
NSDictionary* nameless = apic[@""];
NSData* imageData = nameless[@"data"];
<Convert imageData to image using the method of your choice>

Upvotes: 1

Related Questions