Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Merged a fork |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: | 4f351811b481b317793aabedfc8b406e |
User & Date: | leon 2018-12-17 04:36:39 |
Context
2018-12-17
| ||
04:40 | Added 530 to index.md check-in: f4f9d9861e user: leon tags: trunk | |
04:36 | Merged a fork check-in: 4f351811b4 user: leon tags: trunk | |
2018-12-14
| ||
19:08 | Edited tip/530.md check-in: cecc0dd69e user: leon tags: trunk | |
14:30 | Docuement current (failed) approach to set write metadata. check-in: bbe903ab13 user: oehhar tags: trunk | |
Changes
Changes to tip/529.md.
79 79 80 80 The image create and file load functions recreate the metadata dict. 81 81 Any current contents is lost. 82 82 83 83 The write file commands uses any dict keys it knows. 84 84 Any unknown dict keys are ignored. 85 85 86 +## C interface 87 + 88 +Two new stub table functions are added: 89 + 90 + Tcl_Obj * Tk_PhotoGetMetadata(Tk_PhotoHandle handle) 91 + 92 + void Tk_PhotoSetMetadata(Tk_PhotoHandle handle, Tcl_Obj *metadata) 93 + 94 +This works well for image read. The function "Tk_PhotoSetMetadata" is called within the image read function. 95 + 96 +But it is not suitable for image write, as the required photo handle is not passed into the write functions: 97 + 98 + static int CommonWriteGIF(Tcl_Interp *interp, 99 + const char *fileName, 100 + WriteBytesFunc *writeProc, 101 + Tcl_Obj *format, 102 + Tk_PhotoImageBlock *blockPtr); 103 + 104 +In consequence, the write function should be extended by the metadata object pointer. 105 + 86 106 # Implementation 87 107 88 108 The current implementation is only a sketch in my brain. 89 109 I hope, that an image handler can set the options after reading and a binary extension of the image handlers is not necessary. 90 110 Nevertheless, I don't know jet. 91 111 92 112 Any help and comments are appreciated. 93 113 I am realy a novice here. 94 114 95 115 Implementation may start soon with the tag tip-529-image-metadata. 116 + 117 +# Rejected alternatives 118 + 119 + 96 120 97 121 # Copyright 98 122 99 123 This document has been placed in the public domain.