ojii / pymaging

Pure Python imaging library with Python 2.6, 2.7, 3.1+ support
http://pymaging.rtfd.org
Other
245 stars 29 forks source link

Quickstart example #39

Open jkruso opened 10 years ago

jkruso commented 10 years ago
"""
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')