Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A Python wrapper to load TkImg into a Tk interpreter

Project description

# TkImg for Python
[![Build Status](https://travis-ci.com/RedFantom/python-tkimg.svg?branch=master)](https://travis-ci.org/RedFantom/python-tkimg)
[![Build status](https://ci.appveyor.com/api/projects/status/49k2xqvu7x52ul36?svg=true)](https://ci.appveyor.com/project/RedFantom/python-tkimg)
[![codecov](https://codecov.io/gh/RedFantom/python-tkimg/branch/master/graph/badge.svg)](https://codecov.io/gh/RedFantom/python-tkimg)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
[![PyPI version](https://badge.fury.io/py/tkimg.svg)](https://pypi.python.org/pypi/tkimg)

Python wrapper around TkImg to support more image formats in Tkinter

## Usage
This wrapper uses the binary distributions of `TkImg` (because compiling
them as C-extensions at installation time would be quite difficult on
the different platforms) and loads them dynamically into a
Tcl-interpreter instance (belonging to a `Tk` instance) by evaluating
a `pkgIndex.tcl` file.

After the evaluation of this file, the built-in `PhotoImage` class can
be used to open files of all the file types supported by `TkImg`,
including PNG and TIFF.

```python
import tkinter as tk
from tkimg import load_tkimg

window = tk.Tk()
load_tkimg(window)
tk.PhotoImage('path_to_file.png')
```

## License

python-tkimg: A Python wrapper to load TkImg into a Tcl-interpreter
Copyright (C) 2018 RedFantom

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

The `tkimg` project and the files that belong to it, located in
`/binaries`, are under a separate license, described in
`binaries/LICENSE`. This license allows distribution under another
license, and is thus GNU GPLv3 compatible, as long as the `LICENSE` file
is included.


Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tkimg, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size tkimg-0.0.1-py3-none-any.whl (755.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page