Check-in [4f351811b4]

Login

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:4f351811b481b317793aabedfc8b406e5786fde45eb6570ef4dea6426084de85
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
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tip/529.md.

79
80
81
82
83
84
85




















86
87
88
89
90
91
92
93
94
95




96
97
98
99

The image create and file load functions recreate the metadata dict.
Any current contents is lost.

The write file commands uses any dict keys it knows.
Any unknown dict keys are ignored.





















# Implementation

The current implementation is only a sketch in my brain.
I hope, that an image handler can set the options after reading and a binary extension of the image handlers is not necessary.
Nevertheless, I don't know jet.

Any help and comments are appreciated.
I am realy a novice here.

Implementation may start soon with the tag tip-529-image-metadata.





# Copyright

This document has been placed in the public domain.







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










>
>
>
>




79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

The image create and file load functions recreate the metadata dict.
Any current contents is lost.

The write file commands uses any dict keys it knows.
Any unknown dict keys are ignored.

## C interface

Two new stub table functions are added:

    Tcl_Obj * Tk_PhotoGetMetadata(Tk_PhotoHandle handle)

    void Tk_PhotoSetMetadata(Tk_PhotoHandle handle, Tcl_Obj *metadata)

This works well for image read. The function "Tk_PhotoSetMetadata" is called within the image read function.

But it is not suitable for image write, as the required photo handle is not passed into the write functions:

    static int CommonWriteGIF(Tcl_Interp *interp,
            const char *fileName,
            WriteBytesFunc *writeProc,
            Tcl_Obj *format,
            Tk_PhotoImageBlock *blockPtr);

In consequence, the write function should be extended by the metadata object pointer.

# Implementation

The current implementation is only a sketch in my brain.
I hope, that an image handler can set the options after reading and a binary extension of the image handlers is not necessary.
Nevertheless, I don't know jet.

Any help and comments are appreciated.
I am realy a novice here.

Implementation may start soon with the tag tip-529-image-metadata.

# Rejected alternatives



# Copyright

This document has been placed in the public domain.