imgcmprs 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
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.
- imgcmprs-0.1.1.dist-info/METADATA +110 -0
- imgcmprs-0.1.1.dist-info/RECORD +8 -0
- imgcmprs-0.1.0.dist-info/METADATA +0 -11
- imgcmprs-0.1.0.dist-info/RECORD +0 -8
- {imgcmprs-0.1.0.dist-info → imgcmprs-0.1.1.dist-info}/WHEEL +0 -0
- {imgcmprs-0.1.0.dist-info → imgcmprs-0.1.1.dist-info}/entry_points.txt +0 -0
- {imgcmprs-0.1.0.dist-info → imgcmprs-0.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: imgcmprs
|
3
|
+
Version: 0.1.1
|
4
|
+
Summary: Fast, safe CLI to compress JPEG & PNG, lossless/lossy, batch or single images.
|
5
|
+
Author: Eyad Mohammed
|
6
|
+
Requires-Python: >=3.7
|
7
|
+
Description-Content-Type: text/markdown
|
8
|
+
Requires-Dist: Pillow
|
9
|
+
Dynamic: author
|
10
|
+
Dynamic: description
|
11
|
+
Dynamic: description-content-type
|
12
|
+
Dynamic: requires-dist
|
13
|
+
Dynamic: requires-python
|
14
|
+
Dynamic: summary
|
15
|
+
|
16
|
+
# img
|
17
|
+
|
18
|
+
A fast, easy-to-use Python CLI tool for compressing JPEG and PNG images with both lossless and lossy modes.
|
19
|
+
|
20
|
+
---
|
21
|
+
|
22
|
+
## Features
|
23
|
+
- Compresses images individually or in bulk (folders)
|
24
|
+
- Supports JPEG and PNG
|
25
|
+
- **Lossless mode** (`-l`): Optimizes files without visible quality loss
|
26
|
+
- **Lossy mode** (`-q`): Reduce file size by lowering image quality
|
27
|
+
- Recursive directory support
|
28
|
+
- Custom output folder
|
29
|
+
- Prompts to delete originals after compression
|
30
|
+
- Skips replacement if compressed file is larger
|
31
|
+
- Cross-platform, requires Python 3.7+
|
32
|
+
|
33
|
+
---
|
34
|
+
|
35
|
+
## Installation
|
36
|
+
|
37
|
+
1. Install Python 3.7+
|
38
|
+
2. Clone this repo and install:
|
39
|
+
```bash
|
40
|
+
pip install -e .
|
41
|
+
# Or for user-local install:
|
42
|
+
pip install --user .
|
43
|
+
```
|
44
|
+
|
45
|
+
---
|
46
|
+
|
47
|
+
## Usage
|
48
|
+
|
49
|
+
### Compress a single image (lossy, 60% quality):
|
50
|
+
|
51
|
+
```bash
|
52
|
+
img -i myphoto.jpg -q 60
|
53
|
+
```
|
54
|
+
|
55
|
+
### Compress a folder (lossless, best for PNG):
|
56
|
+
|
57
|
+
```bash
|
58
|
+
img -i images/ -o optimized/ -l -r
|
59
|
+
```
|
60
|
+
|
61
|
+
### Options (Single-letter flags)
|
62
|
+
| Flag | Meaning | Example |
|
63
|
+
|------|--------------------------------|---------------------------|
|
64
|
+
| -i | Input file or folder (required)| `-i mypic.jpg` |
|
65
|
+
| -o | Output file or folder (optional)| `-o compressed/` |
|
66
|
+
| -q | JPEG quality (default 60; ignored in lossless mode)| `-q 80` |
|
67
|
+
| -l | Use lossless compression | `-l` |
|
68
|
+
| -r | Recursively process folders | `-r` |
|
69
|
+
|
70
|
+
- All flags are **single-letter** for speed and ease: `-i`, `-o`, `-q`, `-l`, `-r`.
|
71
|
+
- After compressing, you will be **prompted to delete the original files**.
|
72
|
+
- If the compressed file is larger, the original is kept and a warning is printed.
|
73
|
+
|
74
|
+
---
|
75
|
+
|
76
|
+
## Requirements
|
77
|
+
- Python 3.7+
|
78
|
+
- Pillow (`pip install Pillow`)
|
79
|
+
|
80
|
+
---
|
81
|
+
|
82
|
+
## Notes
|
83
|
+
- Lossless for PNG is truly lossless; for JPEG, uses `quality=100` with optimizations (minor effect but no further visual loss).
|
84
|
+
- Output defaults to `_compressed` directory if not specified for folders.
|
85
|
+
- Re-run with `-l` to optimize previously compressed images further (if possible).
|
86
|
+
|
87
|
+
---
|
88
|
+
|
89
|
+
## Publishing to PyPI
|
90
|
+
|
91
|
+
1. **Ensure you have an account on [PyPI](https://pypi.org/).**
|
92
|
+
2. **Install required tools:**
|
93
|
+
```bash
|
94
|
+
pip install build twine
|
95
|
+
```
|
96
|
+
3. **Build your package:**
|
97
|
+
```bash
|
98
|
+
python -m build
|
99
|
+
```
|
100
|
+
This creates a `dist/` folder with your distributable files (tar.gz and .whl).
|
101
|
+
4. **Upload to PyPI:**
|
102
|
+
```bash
|
103
|
+
python -m twine upload dist/*
|
104
|
+
```
|
105
|
+
5. **Enter your PyPI credentials when prompted.**
|
106
|
+
|
107
|
+
---
|
108
|
+
|
109
|
+
## License
|
110
|
+
MIT
|
@@ -0,0 +1,8 @@
|
|
1
|
+
imgcmprs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
imgcmprs/__main__.py,sha256=Eisst5VBCByPJapyMDtOUk5acdHYHZCDLeX2hPYSvYA,74
|
3
|
+
imgcmprs/img_compress.py,sha256=Cf85lESgNvA_04bZRDbWnY19MRMuf9Ut1QphiDNJP_g,7840
|
4
|
+
imgcmprs-0.1.1.dist-info/METADATA,sha256=-nxlCeUg_TM8UyssixS9Fq911MbTsIV5tF54yyuRge4,3019
|
5
|
+
imgcmprs-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
+
imgcmprs-0.1.1.dist-info/entry_points.txt,sha256=YjgihZeWdWEFCxM9YNipeRN89ZQSzzX-ug2Vih-5Qi4,51
|
7
|
+
imgcmprs-0.1.1.dist-info/top_level.txt,sha256=_XIlYusRXoBCj1vxMvtaSgG9ZAVM1-7C1SQCJQ1GFKU,9
|
8
|
+
imgcmprs-0.1.1.dist-info/RECORD,,
|
@@ -1,11 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: imgcmprs
|
3
|
-
Version: 0.1.0
|
4
|
-
Summary: A CLI tool for compressing images (JPEG, PNG)
|
5
|
-
Author: Your Name
|
6
|
-
Requires-Python: >=3.7
|
7
|
-
Requires-Dist: Pillow
|
8
|
-
Dynamic: author
|
9
|
-
Dynamic: requires-dist
|
10
|
-
Dynamic: requires-python
|
11
|
-
Dynamic: summary
|
imgcmprs-0.1.0.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
imgcmprs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
imgcmprs/__main__.py,sha256=Eisst5VBCByPJapyMDtOUk5acdHYHZCDLeX2hPYSvYA,74
|
3
|
-
imgcmprs/img_compress.py,sha256=Cf85lESgNvA_04bZRDbWnY19MRMuf9Ut1QphiDNJP_g,7840
|
4
|
-
imgcmprs-0.1.0.dist-info/METADATA,sha256=9JpKytDWbdNjerobZlTwCKjZCGlAf3cOrFDUB1j9jME,262
|
5
|
-
imgcmprs-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
6
|
-
imgcmprs-0.1.0.dist-info/entry_points.txt,sha256=YjgihZeWdWEFCxM9YNipeRN89ZQSzzX-ug2Vih-5Qi4,51
|
7
|
-
imgcmprs-0.1.0.dist-info/top_level.txt,sha256=_XIlYusRXoBCj1vxMvtaSgG9ZAVM1-7C1SQCJQ1GFKU,9
|
8
|
-
imgcmprs-0.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|