PolyFiller
Python module for polygon filling on images.
Installation
Package Installation from PyPi
$ pip install polyfiller-g4
Package Installation from Source Code
The source code is available on GitHub.
Download and install the package:
$ git clone https://github.com/Genzo4/polyfiller
$ cd polyfiller
$ pip install -r requirements.txt
$ pip install .
Basic usage
from polyfiller_g4 import PolyFiller
Create an instance of the PolyFiller. You can specify additional options:
- ext - extension to add to the output file. Default value: fill.
- color - filling color. Default value: 0 (black).
pf = PolyFiller(ext='add_ext', color=(255, 0, 0))
pf.addPolygon([[0, 0], [1919, 0], [1919, 682], [1277, 385], [951, 374], [0, 615]])
pf.addPolygon([[100, 100], [200, 100], [150, 150]])
pf.fill('frame_1.png')
pf.fill('frame_2.png')
...
pf.fill('frame_n.png')
Output files are created with the extension added.
See the example.py file for an example of usage.
PolyFiller
Python модуль для заливки многоугольника\ов на изображении однотонным цветом.
Установка
Установка пакета с PyPi
$ pip install polyfiller-g4
Установка пакета из исходного кода
Исходный код размещается на GitHub.
Скачайте его и установите пакет:
$ git clone https://github.com/Genzo4/polyfiller
$ cd polyfiller
$ pip install -r requirements.txt
$ pip install .
Использование
from polyfiller_g4 import PolyFiller
Создаём экземпляр PolyFiller. Можно указать дополнительные параметры:
- ext - расширение, добавляемое к выходному файлу. Значение по умолчанию: fill.
- color - цвет заливки. Значение по умолчанию: 0 (чёрный цвет).
pf = PolyFiller(ext='add_ext', color=(255, 0, 0))
pf.addPolygon([[0, 0], [1919, 0], [1919, 682], [1277, 385], [951, 374], [0, 615]])
pf.addPolygon([[100, 100], [200, 100], [150, 150]])
pf.fill('frame_1.png')
pf.fill('frame_2.png')
...
pf.fill('frame_n.png')
Создаются выходные файлы с добавленным расширением.
Пример использования см. в файле example.py
Metadata
Release files for polyfiller-g4 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| polyfiller_g4-1.2.0.tar.gz | 6.2 kB | Without provenance | Details for polyfiller_g4-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| polyfiller_g4-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for polyfiller_g4-1.2.0-py3-none-any.whl |
Total release size: 11.5 kB
Release files / polyfiller_g4-1.2.0.tar.gz
| Download URL | polyfiller_g4-1.2.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b48d42c5b6e7bbe838e6aaa777234e396a84e3f2deb0eb48880593b84807156c
|
|
BLAKE2b-256 checksum How to use checksums |
b545403d6dde7747a9524d88b7f18874787c651d96d6ff946c9e14e94b3f7912
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / polyfiller_g4-1.2.0-py3-none-any.whl
| Download URL | polyfiller_g4-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc5122a79f8e8e5c9feb238992be556e44b89c2e6cc6cbf979cf563a5b4f7014
|
|
BLAKE2b-256 checksum How to use checksums |
cb14e10144db88a96940fe35f93bd13aa3fcf874d05f479ab2ea99b12ee6e325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for polyfiller-g4 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.