Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions