Sven Neumann wrote:
it would be very helpful if you could point us to some documentation
about the MacOS X clipboard. I am particularily interested in the
formats that are typically used to exchange data using the clipboard.

Cocoa apps (those written with the NeXT-derived toolkit) use TIFF for transferring raster images. Older apps (like Photoshop) tend to use PICT, which is a metafile format encapsulating calls to the QuickDraw drawing library. Using the Cocoa NSPasteboard interface, I can copy a TIFF and it performs the conversion to PICT for me, but when pasting I need to handle both formats.

Additionally rich text data may contain TIFF images, which can be extracted (this is useful for copying images from an RTFD document in TextEdit).

Cocoa prefers premultiplied alpha, so there's some lossy conversion for images with partially transparent areas. (This could probably be eliminated between instances of the Gimp by using libtiff to create & read the TIFFs rather than NSBitmapImageRep which I'm using at the moment.)

How is image cut-n-paste handled on Win32? Windows apps use DIB (.bmp) format for clipboard transfer; does the GDK backend handle DIB<->PNG conversion? I took a quick look around gdkselection-win32.c & friends but didn't see anything obvious.

-- brion vibber (brion @

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to