Skip to content

Support more photo image options in tkinter.PhotoImage methods #151890

@serhiy-storchaka

Description

@serhiy-storchaka

Several options of the Tk photo image subcommands have no corresponding parameter in the :class:tkinter.PhotoImage methods and are currently reachable only through tk.call().

  • The -format option of put (since Tk 8.6) specifies the format of the image data.
  • The -metadata option of put, read, write and data (new in Tk 9.0) passes a metadata dictionary to the image format driver.
  • The -withalpha option of get (new in Tk 9.0) returns the alpha value of the pixel in addition to its color.

I propose to add the corresponding format and metadata parameters to put, the metadata parameter to read, write and data, and the withalpha parameter to get.

Linked PRs

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions