jeudi 28 avril 2016

converting Data from a Sqlite Column to a NSImage

I read a binary column from a SQLite database and when I write it out to a file. it can be displayed in preview and the file looks like a PNG file.

[binaryData writeToURL:savePanel.URL atomically:YES];

however when I try to display it in a window it will not show.

viwerController.binaryImageViwer.image = [[NSImage alloc] initWithData:(NSData *) binaryData];

I have tried a few things but nothing works.

can someone please tell me what I am doing wrong.

Cheers Christian Andersen

Aucun commentaire:

Enregistrer un commentaire