Skip to content

Instantly share code, notes, and snippets.

@conquistadorjd
Last active January 2, 2022 11:33
Show Gist options
  • Select an option

  • Save conquistadorjd/2c93de1d95fa1a953c2221efc4420c4b to your computer and use it in GitHub Desktop.

Select an option

Save conquistadorjd/2c93de1d95fa1a953c2221efc4420c4b to your computer and use it in GitHub Desktop.
image pricessing using PIL, pillow
################################################################################################
# name: 01_read_image.py
# desc:
# date: 2019-02-10
# Author: conquistadorjd
################################################################################################
from PIL import Image
print('*** Program Started ***')
# image_font_path = 'imagepath_input = '/home/conquistador/code/github/python-01-utilities/image/fonts/'
image_path_input = '/home/conquistador/code/github/python-01-utilities/image/input/'
# image_path_output = '/home/conquistador/code/github/python-01-utilities/image/output/'
image_name_input = '01_read_image.jpg'
im = Image.open(image_path_input + image_name_input)
print('im object: ', im)
print('format : ' , im.format)
print('size : ' , im.size)
print('mode : ' , im.mode)
print('filename : ' , im.filename)
print('width : ' , im.width)
print('height : ' , im.height)
print('info : ' , im.info)
# This will display image on screen
# im.show()
print('*** Program Ended ***')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment