mirror of
https://github.com/metafy-social/python-scripts.git
synced 2025-01-30 21:23:46 +00:00
Merge pull request #87 from SiddheshKukade/master
Feature Request : Img to Png coverter in python
This commit is contained in:
commit
dc1b961478
12
scripts/jpg-to-png Converter/README.md
Normal file
12
scripts/jpg-to-png Converter/README.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# JPG to PNG convereter in pyton
|
||||
This is a simple script that lets you convert JPG to PNG.
|
||||
|
||||
## Usage
|
||||
|
||||
* Clone the repo
|
||||
* download the requirements
|
||||
* Install [wkhtmltopdf](https://wkhtmltopdf.org/downloads.html) as per your operating system
|
||||
* run `python script.py`
|
||||
|
||||
## Details
|
||||
- make sure to provide the path of the `image` and also for the conveted png image accordingly in order to make the program work correctly.
|
4
scripts/jpg-to-png Converter/convert.py
Normal file
4
scripts/jpg-to-png Converter/convert.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from PIL import Image
|
||||
# Make sure to add the paths of Images
|
||||
im1 = Image.open(r'path where the JPG is stored\file name.jpg')
|
||||
im1.save(r'path where the PNG will be stored\new file name.png')
|
Loading…
Reference in New Issue
Block a user