Check-in [bbe903ab13]

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Docuement current (failed) approach to set write metadata.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:bbe903ab1309f7b788b6a198f503c49debb61d52489a3c04ec06cf7a87bff7c9
User & Date: oehhar 2018-12-14 14:30:20
Context
2018-12-17
04:36
Merged a fork check-in: 4f351811b4 user: leon tags: trunk
2018-12-14
14:30
Docuement current (failed) approach to set write metadata. check-in: bbe903ab13 user: oehhar tags: trunk
2018-12-13
11:00
Editorial pass on 507 check-in: 75f5c2c704 user: dkf tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

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.