karuka 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- karuka-0.1.1/CODE_OF_CONDUCT.md +21 -0
- karuka-0.1.1/CONTRIBUTING.md +38 -0
- karuka-0.1.1/LICENSE +21 -0
- karuka-0.1.1/MANIFEST.in +9 -0
- karuka-0.1.1/PKG-INFO +166 -0
- karuka-0.1.1/README.md +127 -0
- karuka-0.1.1/SECURITY.md +11 -0
- karuka-0.1.1/karuka.egg-info/PKG-INFO +166 -0
- karuka-0.1.1/karuka.egg-info/SOURCES.txt +34 -0
- karuka-0.1.1/karuka.egg-info/dependency_links.txt +1 -0
- karuka-0.1.1/karuka.egg-info/entry_points.txt +5 -0
- karuka-0.1.1/karuka.egg-info/requires.txt +16 -0
- karuka-0.1.1/karuka.egg-info/top_level.txt +1 -0
- karuka-0.1.1/karuka_image_editor/__init__.py +3 -0
- karuka-0.1.1/karuka_image_editor/__main__.py +5 -0
- karuka-0.1.1/karuka_image_editor/assets/__init__.py +1 -0
- karuka-0.1.1/karuka_image_editor/assets/karuka_logo.png +0 -0
- karuka-0.1.1/karuka_image_editor/core/__init__.py +1 -0
- karuka-0.1.1/karuka_image_editor/core/bgremove.py +34 -0
- karuka-0.1.1/karuka_image_editor/core/convert.py +12 -0
- karuka-0.1.1/karuka_image_editor/core/crop.py +7 -0
- karuka-0.1.1/karuka_image_editor/core/resize.py +55 -0
- karuka-0.1.1/karuka_image_editor/core/rotate.py +7 -0
- karuka-0.1.1/karuka_image_editor/desktop.py +57 -0
- karuka-0.1.1/karuka_image_editor/main.py +18 -0
- karuka-0.1.1/karuka_image_editor/misc/__init__.py +1 -0
- karuka-0.1.1/karuka_image_editor/misc/main.py +99 -0
- karuka-0.1.1/karuka_image_editor/ui/__init__.py +1 -0
- karuka-0.1.1/karuka_image_editor/ui/app.py +836 -0
- karuka-0.1.1/karuka_image_editor/utils/__init__.py +1 -0
- karuka-0.1.1/karuka_image_editor/utils/file_utils.py +0 -0
- karuka-0.1.1/pyproject.toml +71 -0
- karuka-0.1.1/requirements-bgremove.txt +1 -0
- karuka-0.1.1/requirements-heic.txt +1 -0
- karuka-0.1.1/requirements.txt +2 -0
- karuka-0.1.1/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We pledge to make participation in this project a harassment-free experience for everyone.
|
|
6
|
+
|
|
7
|
+
## Expected Behavior
|
|
8
|
+
|
|
9
|
+
- Be respectful and constructive.
|
|
10
|
+
- Keep discussion focused on improving the project.
|
|
11
|
+
- Accept maintainers' decisions when they are made to protect project quality or community safety.
|
|
12
|
+
|
|
13
|
+
## Unacceptable Behavior
|
|
14
|
+
|
|
15
|
+
- Harassment, insults, threats, or personal attacks.
|
|
16
|
+
- Publishing private information without permission.
|
|
17
|
+
- Repeated disruption of project spaces after being asked to stop.
|
|
18
|
+
|
|
19
|
+
## Enforcement
|
|
20
|
+
|
|
21
|
+
Maintainers may remove comments, close issues, reject contributions, or block participants when needed to uphold this code of conduct.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for helping improve Karuka Image Editor.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
python -m venv .venv
|
|
9
|
+
source .venv/bin/activate
|
|
10
|
+
python -m pip install -e ".[dev,bgremove]"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
On Windows, activate the virtual environment with:
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
.venv\Scripts\Activate.ps1
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Local Checks
|
|
20
|
+
|
|
21
|
+
Run a syntax check before opening a pull request:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
python -m compileall .
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Build the package when changing packaging metadata:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
python -m build
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Pull Requests
|
|
34
|
+
|
|
35
|
+
- Keep changes focused on one issue or feature.
|
|
36
|
+
- Include a short description of user-visible behavior changes.
|
|
37
|
+
- Avoid committing generated files such as `__pycache__/`, edited image outputs, build artifacts, or local virtual environments.
|
|
38
|
+
- Update `README.md` when changing install, run, or packaging behavior.
|
karuka-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TempleDiary
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
karuka-0.1.1/MANIFEST.in
ADDED
karuka-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: karuka
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: A small Tkinter desktop image editor for resizing, cropping, rotating, converting, and removing backgrounds.
|
|
5
|
+
Author: TempleDiary
|
|
6
|
+
Maintainer: TempleDiary
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/TempleDiary/karuka-image-editor
|
|
9
|
+
Project-URL: Issues, https://github.com/TempleDiary/karuka-image-editor/issues
|
|
10
|
+
Project-URL: Source, https://github.com/TempleDiary/karuka-image-editor
|
|
11
|
+
Keywords: image-editor,tkinter,pillow,resize,crop,batch-resize,heic,background-removal
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: X11 Applications
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
22
|
+
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: Pillow>=10.0.0
|
|
27
|
+
Requires-Dist: tkinterdnd2>=0.4.3
|
|
28
|
+
Provides-Extra: bgremove
|
|
29
|
+
Requires-Dist: rembg>=2.0.0; extra == "bgremove"
|
|
30
|
+
Provides-Extra: heic
|
|
31
|
+
Requires-Dist: pillow-heif>=0.16.0; extra == "heic"
|
|
32
|
+
Provides-Extra: all
|
|
33
|
+
Requires-Dist: rembg>=2.0.0; extra == "all"
|
|
34
|
+
Requires-Dist: pillow-heif>=0.16.0; extra == "all"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: build>=1.2.0; extra == "dev"
|
|
37
|
+
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
|
|
40
|
+
# Karuka Image Editor
|
|
41
|
+
|
|
42
|
+
Built and open sourced by TempleDiary.
|
|
43
|
+
|
|
44
|
+
Karuka Image Editor is a small Python desktop app for common image editing tasks:
|
|
45
|
+
|
|
46
|
+
- open and browse local image folders
|
|
47
|
+
- drag and drop image files into the app
|
|
48
|
+
- resize images with optional exact-size crop
|
|
49
|
+
- batch resize folders into another folder while keeping file names
|
|
50
|
+
- crop with a drag selection
|
|
51
|
+
- rotate left or right
|
|
52
|
+
- convert images to JPEG, JPG, PNG, or HEIC
|
|
53
|
+
- remove backgrounds with the optional `rembg` extra
|
|
54
|
+
- save edited output to the user's Downloads folder
|
|
55
|
+
- bundled Karuka logo and desktop window icon
|
|
56
|
+
|
|
57
|
+
## Screenshot
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
## Requirements
|
|
62
|
+
|
|
63
|
+
- Python 3.10 or newer
|
|
64
|
+
- Tkinter, usually included with Python. On some Linux distributions it is a separate system package such as `python3-tk`.
|
|
65
|
+
- `tkinterdnd2`, installed by the project, enables desktop drag-and-drop support.
|
|
66
|
+
|
|
67
|
+
## Install From Source
|
|
68
|
+
|
|
69
|
+
After the public PyPI release:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
python -m pip install karuka
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
From a local checkout:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
python -m pip install .
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
For AI background removal support:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
python -m pip install ".[bgremove]"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
For HEIC input/output support:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
python -m pip install ".[heic]"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For all optional image features:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
python -m pip install ".[all]"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For packaging and publishing checks:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
python -m pip install ".[dev]"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Run
|
|
106
|
+
|
|
107
|
+
After installation:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
karuka
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
On Linux, install a desktop menu launcher and icon:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
karuka-desktop
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
From a source checkout:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
python -m karuka_image_editor
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Batch Resize And Convert
|
|
126
|
+
|
|
127
|
+
Use **Batch Resize / Convert** in the editor panel to choose a source folder, output folder, target size, exact-size crop mode, and output format.
|
|
128
|
+
|
|
129
|
+
The output folder defaults to `Downloads/karuka_batch_output`. Files are saved with the same base name and the selected output extension, for example `photo.png` becomes `photo.jpeg` when JPEG is selected.
|
|
130
|
+
|
|
131
|
+
HEIC support depends on the optional `pillow-heif` package.
|
|
132
|
+
|
|
133
|
+
## Package Layout
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
karuka_image_editor/core/ Image operation helpers
|
|
137
|
+
karuka_image_editor/ui/ Tkinter application interface
|
|
138
|
+
karuka_image_editor/utils/ Shared utility package
|
|
139
|
+
karuka_image_editor/misc/ Experimental command-line scripts
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The distribution metadata lives in `pyproject.toml`. Package discovery includes the `karuka_image_editor` package, and `karuka_image_editor.main` provides the `karuka` console command.
|
|
143
|
+
|
|
144
|
+
## Build
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
python -m build
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The generated `dist/` directory is ignored by git.
|
|
151
|
+
|
|
152
|
+
## Project Status
|
|
153
|
+
|
|
154
|
+
This project is early-stage software. Public APIs and packaging details may change before a `1.0.0` release.
|
|
155
|
+
|
|
156
|
+
## Contributing
|
|
157
|
+
|
|
158
|
+
Contributions are welcome. Please read `CONTRIBUTING.md` before opening a pull request.
|
|
159
|
+
|
|
160
|
+
## Contact
|
|
161
|
+
|
|
162
|
+
Maintainer: TempleDiary
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
Released under the MIT License. See `LICENSE`.
|
karuka-0.1.1/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Karuka Image Editor
|
|
2
|
+
|
|
3
|
+
Built and open sourced by TempleDiary.
|
|
4
|
+
|
|
5
|
+
Karuka Image Editor is a small Python desktop app for common image editing tasks:
|
|
6
|
+
|
|
7
|
+
- open and browse local image folders
|
|
8
|
+
- drag and drop image files into the app
|
|
9
|
+
- resize images with optional exact-size crop
|
|
10
|
+
- batch resize folders into another folder while keeping file names
|
|
11
|
+
- crop with a drag selection
|
|
12
|
+
- rotate left or right
|
|
13
|
+
- convert images to JPEG, JPG, PNG, or HEIC
|
|
14
|
+
- remove backgrounds with the optional `rembg` extra
|
|
15
|
+
- save edited output to the user's Downloads folder
|
|
16
|
+
- bundled Karuka logo and desktop window icon
|
|
17
|
+
|
|
18
|
+
## Screenshot
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
## Requirements
|
|
23
|
+
|
|
24
|
+
- Python 3.10 or newer
|
|
25
|
+
- Tkinter, usually included with Python. On some Linux distributions it is a separate system package such as `python3-tk`.
|
|
26
|
+
- `tkinterdnd2`, installed by the project, enables desktop drag-and-drop support.
|
|
27
|
+
|
|
28
|
+
## Install From Source
|
|
29
|
+
|
|
30
|
+
After the public PyPI release:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
python -m pip install karuka
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
From a local checkout:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
python -m pip install .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For AI background removal support:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
python -m pip install ".[bgremove]"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For HEIC input/output support:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
python -m pip install ".[heic]"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
For all optional image features:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
python -m pip install ".[all]"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For packaging and publishing checks:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
python -m pip install ".[dev]"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Run
|
|
67
|
+
|
|
68
|
+
After installation:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
karuka
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
On Linux, install a desktop menu launcher and icon:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
karuka-desktop
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
From a source checkout:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
python -m karuka_image_editor
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Batch Resize And Convert
|
|
87
|
+
|
|
88
|
+
Use **Batch Resize / Convert** in the editor panel to choose a source folder, output folder, target size, exact-size crop mode, and output format.
|
|
89
|
+
|
|
90
|
+
The output folder defaults to `Downloads/karuka_batch_output`. Files are saved with the same base name and the selected output extension, for example `photo.png` becomes `photo.jpeg` when JPEG is selected.
|
|
91
|
+
|
|
92
|
+
HEIC support depends on the optional `pillow-heif` package.
|
|
93
|
+
|
|
94
|
+
## Package Layout
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
karuka_image_editor/core/ Image operation helpers
|
|
98
|
+
karuka_image_editor/ui/ Tkinter application interface
|
|
99
|
+
karuka_image_editor/utils/ Shared utility package
|
|
100
|
+
karuka_image_editor/misc/ Experimental command-line scripts
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The distribution metadata lives in `pyproject.toml`. Package discovery includes the `karuka_image_editor` package, and `karuka_image_editor.main` provides the `karuka` console command.
|
|
104
|
+
|
|
105
|
+
## Build
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
python -m build
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The generated `dist/` directory is ignored by git.
|
|
112
|
+
|
|
113
|
+
## Project Status
|
|
114
|
+
|
|
115
|
+
This project is early-stage software. Public APIs and packaging details may change before a `1.0.0` release.
|
|
116
|
+
|
|
117
|
+
## Contributing
|
|
118
|
+
|
|
119
|
+
Contributions are welcome. Please read `CONTRIBUTING.md` before opening a pull request.
|
|
120
|
+
|
|
121
|
+
## Contact
|
|
122
|
+
|
|
123
|
+
Maintainer: TempleDiary
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
Released under the MIT License. See `LICENSE`.
|
karuka-0.1.1/SECURITY.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Security fixes are handled on the latest released version.
|
|
6
|
+
|
|
7
|
+
## Reporting a Vulnerability
|
|
8
|
+
|
|
9
|
+
Please report security issues privately by opening a security advisory for the project.
|
|
10
|
+
|
|
11
|
+
Do not publish exploit details until maintainers have had a reasonable opportunity to investigate and release a fix.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: karuka
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: A small Tkinter desktop image editor for resizing, cropping, rotating, converting, and removing backgrounds.
|
|
5
|
+
Author: TempleDiary
|
|
6
|
+
Maintainer: TempleDiary
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/TempleDiary/karuka-image-editor
|
|
9
|
+
Project-URL: Issues, https://github.com/TempleDiary/karuka-image-editor/issues
|
|
10
|
+
Project-URL: Source, https://github.com/TempleDiary/karuka-image-editor
|
|
11
|
+
Keywords: image-editor,tkinter,pillow,resize,crop,batch-resize,heic,background-removal
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: X11 Applications
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
22
|
+
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: Pillow>=10.0.0
|
|
27
|
+
Requires-Dist: tkinterdnd2>=0.4.3
|
|
28
|
+
Provides-Extra: bgremove
|
|
29
|
+
Requires-Dist: rembg>=2.0.0; extra == "bgremove"
|
|
30
|
+
Provides-Extra: heic
|
|
31
|
+
Requires-Dist: pillow-heif>=0.16.0; extra == "heic"
|
|
32
|
+
Provides-Extra: all
|
|
33
|
+
Requires-Dist: rembg>=2.0.0; extra == "all"
|
|
34
|
+
Requires-Dist: pillow-heif>=0.16.0; extra == "all"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: build>=1.2.0; extra == "dev"
|
|
37
|
+
Requires-Dist: twine>=5.0.0; extra == "dev"
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
|
|
40
|
+
# Karuka Image Editor
|
|
41
|
+
|
|
42
|
+
Built and open sourced by TempleDiary.
|
|
43
|
+
|
|
44
|
+
Karuka Image Editor is a small Python desktop app for common image editing tasks:
|
|
45
|
+
|
|
46
|
+
- open and browse local image folders
|
|
47
|
+
- drag and drop image files into the app
|
|
48
|
+
- resize images with optional exact-size crop
|
|
49
|
+
- batch resize folders into another folder while keeping file names
|
|
50
|
+
- crop with a drag selection
|
|
51
|
+
- rotate left or right
|
|
52
|
+
- convert images to JPEG, JPG, PNG, or HEIC
|
|
53
|
+
- remove backgrounds with the optional `rembg` extra
|
|
54
|
+
- save edited output to the user's Downloads folder
|
|
55
|
+
- bundled Karuka logo and desktop window icon
|
|
56
|
+
|
|
57
|
+
## Screenshot
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
## Requirements
|
|
62
|
+
|
|
63
|
+
- Python 3.10 or newer
|
|
64
|
+
- Tkinter, usually included with Python. On some Linux distributions it is a separate system package such as `python3-tk`.
|
|
65
|
+
- `tkinterdnd2`, installed by the project, enables desktop drag-and-drop support.
|
|
66
|
+
|
|
67
|
+
## Install From Source
|
|
68
|
+
|
|
69
|
+
After the public PyPI release:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
python -m pip install karuka
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
From a local checkout:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
python -m pip install .
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
For AI background removal support:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
python -m pip install ".[bgremove]"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
For HEIC input/output support:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
python -m pip install ".[heic]"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For all optional image features:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
python -m pip install ".[all]"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For packaging and publishing checks:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
python -m pip install ".[dev]"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Run
|
|
106
|
+
|
|
107
|
+
After installation:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
karuka
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
On Linux, install a desktop menu launcher and icon:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
karuka-desktop
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
From a source checkout:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
python -m karuka_image_editor
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Batch Resize And Convert
|
|
126
|
+
|
|
127
|
+
Use **Batch Resize / Convert** in the editor panel to choose a source folder, output folder, target size, exact-size crop mode, and output format.
|
|
128
|
+
|
|
129
|
+
The output folder defaults to `Downloads/karuka_batch_output`. Files are saved with the same base name and the selected output extension, for example `photo.png` becomes `photo.jpeg` when JPEG is selected.
|
|
130
|
+
|
|
131
|
+
HEIC support depends on the optional `pillow-heif` package.
|
|
132
|
+
|
|
133
|
+
## Package Layout
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
karuka_image_editor/core/ Image operation helpers
|
|
137
|
+
karuka_image_editor/ui/ Tkinter application interface
|
|
138
|
+
karuka_image_editor/utils/ Shared utility package
|
|
139
|
+
karuka_image_editor/misc/ Experimental command-line scripts
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The distribution metadata lives in `pyproject.toml`. Package discovery includes the `karuka_image_editor` package, and `karuka_image_editor.main` provides the `karuka` console command.
|
|
143
|
+
|
|
144
|
+
## Build
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
python -m build
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The generated `dist/` directory is ignored by git.
|
|
151
|
+
|
|
152
|
+
## Project Status
|
|
153
|
+
|
|
154
|
+
This project is early-stage software. Public APIs and packaging details may change before a `1.0.0` release.
|
|
155
|
+
|
|
156
|
+
## Contributing
|
|
157
|
+
|
|
158
|
+
Contributions are welcome. Please read `CONTRIBUTING.md` before opening a pull request.
|
|
159
|
+
|
|
160
|
+
## Contact
|
|
161
|
+
|
|
162
|
+
Maintainer: TempleDiary
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
Released under the MIT License. See `LICENSE`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
CODE_OF_CONDUCT.md
|
|
2
|
+
CONTRIBUTING.md
|
|
3
|
+
LICENSE
|
|
4
|
+
MANIFEST.in
|
|
5
|
+
README.md
|
|
6
|
+
SECURITY.md
|
|
7
|
+
pyproject.toml
|
|
8
|
+
requirements-bgremove.txt
|
|
9
|
+
requirements-heic.txt
|
|
10
|
+
requirements.txt
|
|
11
|
+
karuka.egg-info/PKG-INFO
|
|
12
|
+
karuka.egg-info/SOURCES.txt
|
|
13
|
+
karuka.egg-info/dependency_links.txt
|
|
14
|
+
karuka.egg-info/entry_points.txt
|
|
15
|
+
karuka.egg-info/requires.txt
|
|
16
|
+
karuka.egg-info/top_level.txt
|
|
17
|
+
karuka_image_editor/__init__.py
|
|
18
|
+
karuka_image_editor/__main__.py
|
|
19
|
+
karuka_image_editor/desktop.py
|
|
20
|
+
karuka_image_editor/main.py
|
|
21
|
+
karuka_image_editor/assets/__init__.py
|
|
22
|
+
karuka_image_editor/assets/karuka_logo.png
|
|
23
|
+
karuka_image_editor/core/__init__.py
|
|
24
|
+
karuka_image_editor/core/bgremove.py
|
|
25
|
+
karuka_image_editor/core/convert.py
|
|
26
|
+
karuka_image_editor/core/crop.py
|
|
27
|
+
karuka_image_editor/core/resize.py
|
|
28
|
+
karuka_image_editor/core/rotate.py
|
|
29
|
+
karuka_image_editor/misc/__init__.py
|
|
30
|
+
karuka_image_editor/misc/main.py
|
|
31
|
+
karuka_image_editor/ui/__init__.py
|
|
32
|
+
karuka_image_editor/ui/app.py
|
|
33
|
+
karuka_image_editor/utils/__init__.py
|
|
34
|
+
karuka_image_editor/utils/file_utils.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
karuka_image_editor
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Bundled image assets for Karuka Image Editor."""
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Image operation helpers for Karuka Image Editor."""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from PIL import Image
|
|
2
|
+
|
|
3
|
+
def remove_bg_ai(input_path, output_path):
|
|
4
|
+
from rembg import remove
|
|
5
|
+
|
|
6
|
+
with open(input_path, 'rb') as i:
|
|
7
|
+
input_data = i.read()
|
|
8
|
+
|
|
9
|
+
output_data = remove(input_data)
|
|
10
|
+
|
|
11
|
+
with open(output_path, 'wb') as o:
|
|
12
|
+
o.write(output_data)
|
|
13
|
+
|
|
14
|
+
print("AI background removed!")
|
|
15
|
+
|
|
16
|
+
def remove_white_background(input_path, output_path, threshold=240):
|
|
17
|
+
img = Image.open(input_path).convert("RGBA")
|
|
18
|
+
|
|
19
|
+
data = img.getdata()
|
|
20
|
+
new_data = []
|
|
21
|
+
|
|
22
|
+
for pixel in data:
|
|
23
|
+
r, g, b, a = pixel
|
|
24
|
+
|
|
25
|
+
# Detect near-white
|
|
26
|
+
if r > threshold and g > threshold and b > threshold:
|
|
27
|
+
new_data.append((255, 255, 255, 0)) # transparent
|
|
28
|
+
else:
|
|
29
|
+
new_data.append(pixel)
|
|
30
|
+
|
|
31
|
+
img.putdata(new_data)
|
|
32
|
+
img.save(output_path, "PNG")
|
|
33
|
+
|
|
34
|
+
return output_path
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from PIL import Image
|
|
2
|
+
|
|
3
|
+
def convert_image(input_path, output_path, format):
|
|
4
|
+
img = Image.open(input_path)
|
|
5
|
+
|
|
6
|
+
# Handle JPG (no transparency)
|
|
7
|
+
if format.lower() in ["jpg", "jpeg"]:
|
|
8
|
+
img = img.convert("RGB")
|
|
9
|
+
|
|
10
|
+
img.save(output_path, format=format.upper())
|
|
11
|
+
|
|
12
|
+
return output_path
|