ojii / pymaging

Pure Python imaging library with Python 2.6, 2.7, 3.1+ support

Home Page:http://pymaging.rtfd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quickstart example

jkruso opened this issue · comments

"""
Have to change code in image.py so file is not prematurely closed:
  def open_from_path(cls, filepath):
      #jtk with open(filepath, 'rb') as fobj:
          fobj = open(filepath, 'rb')   # jtk
          return cls.open(fobj)    
Have to change Quickstart example
  http://pymaging.readthedocs.org/en/latest/usr/quickstart.html
to cleanup after resize().
Also, save() does not work
"""
from pymaging import Image
img = Image.open_from_path('test1-960x720.png')
img = img.resize(300, 300)
img.width, img.height = 300,300
img.save_to_path('test1-300x300.png')