mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-24 04:21:12 +00:00
changes made
This commit is contained in:
parent
b785bd7ca9
commit
e8f23fd245
7
scripts/PNG_To_PDF/README.md
Normal file
7
scripts/PNG_To_PDF/README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
This script consist of python code which converts PNG to PDF.
|
||||||
|
|
||||||
|
It has a PNG image to use as example. For using this code just write url of different image which you want to use under image1 variable.
|
||||||
|
|
||||||
|
Write the location of the PDF to be saved at in the memory under "impdf.save".
|
||||||
|
|
||||||
|
I have used flake8 linting on this as well.
|
BIN
scripts/PNG_To_PDF/img.png
Normal file
BIN
scripts/PNG_To_PDF/img.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
5
scripts/PNG_To_PDF/png-to-pdf.py
Normal file
5
scripts/PNG_To_PDF/png-to-pdf.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
image1 = Image.open(r'png-to-pdf.png')
|
||||||
|
impdf = image1.convert('RGB')
|
||||||
|
impdf.save(r'png-to-pdf.pdf') # noqa
|
Loading…
Reference in New Issue
Block a user