tags:

views:

27

answers:

1

In Windows' and MacOS's metafiles (WMF/EMF and PICT/PDF) you can attach any information that goes along with the metafile - it can be something specific for you application. How can I achieve same result on Linux? I'm not using GDK or Qt - just "plain" XLib, Xt and Motif.

The idea is that I want to copy and send something from my application (via selection) to someone else, for example as PIXMAP. But still want to encode the information I've sent in my custom format so when I get back same object I can retrieve this information and make the object editable in my application.

A: 

X Pixmap format, or XPM format is a subset of the C programming language. an XPM file is a C styled array with the image data and you could also have comments in there.

I am not sure if their is a standard for metadata like there is for jpeg etc. You could stick it in a /* comment */

Sean A.O. Harney
Thank you, but I am not talking about XPM "file format", but about the Pixmap - X Server, internal data object.
theJonan
Oh, I don't think that is possible, the Pixmap type returned by XCreatePixmap(3) is just an unsigned int used as a key, and there doesn't seem to be any way to attaching metadata with the public API.One possible solution would be to use steganography to encode some data in the least significant pixel bits.
Sean A.O. Harney