You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a6dc5b0
Browse filesBrowse the repository at this point in the historyBrowse files
These scripts can change format of images from PNG to JPG and JPG to PNG
4
+
5
+
### Prerequisites
6
+
<!--Remove the below lines and add yours -->
7
+
Required Modules
8
+
- PIL==1.1.6
9
+
10
+
to install:
11
+
```
12
+
$ pip install -r requirements.txt
13
+
```
14
+
15
+
### How to run the script
16
+
<!--Remove the below lines and add yours -->
17
+
- Dynamic Change
18
+
Copy the script convertDynamic.py into the directory where images are (PNG and/or JPG). And run:
19
+
``` bash
20
+
$ python convertDynamic.py
21
+
```
22
+
This will convert all JPG images to PNG and PNG images to JPG in present directory tree recursively(.i.e. will change format in images inside sub-directories too.)
23
+
- JPG to PNG (single image)
24
+
1. Copy the JPG image in directory where `JPGtoPNG.py` exists
25
+
2. Replace file name `naruto_first.jpg` inside `JPGtoPNG.py`(line 3) to input file name(JPG).
26
+
3. Replace file name `naruto.png` inside `JPGtoPNG.py`(line 4) to output file name(PNG).
27
+
4. Run following command:
28
+
```
29
+
$ python JPGtoPNG.py
30
+
```
31
+
- PNG to JPG (single image)
32
+
1. Copy the PNG image in directory where `PNGtoJPG.py` exists
33
+
2. Replace file name `naruto_first.png` inside `PNGtoJPG.py`(line 3) to input file name(PNG).
34
+
3. Replace file name `naruto.jpg` inside `PNGtoJPG.py`(line 4) to output file name(JPG).
0 commit comments