|
From: | Riccardo Mottola |
Subject: | enriched image information in pasteboard in Graphos |
Date: | Thu, 26 Feb 2015 21:59:10 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1 |
Hi,I am in the need of copying an image in Graphos through the copy/paste mechanism.
Objects in graphos get copied with a specific pasteboard type as plist,. The same plist is also used to save to a file.
The plist contains objects where you have e.g. positions and sizes. The properties are "serialized" manually, so a NSPoint is actually split in x, y in a human readable form.
If I want to copy an image, I need to provide both the data (e.g. TIFFRepresentation as NSData) but also the accessory information I need. How can I put NSData in a property list? can I serialize it in a clever way? I suppos some kind of 7bit encoding needs to happen, a bit like hex64 for mail attachments.
Riccardo
[Prev in Thread] | Current Thread | [Next in Thread] |