comparison README.txt @ 5:c89738f3f417

* improve command line interface * improve README * bump version
author k0s <k0scist@gmail.com>
date Sat, 06 Mar 2010 14:55:04 -0500
parents 6ec33e2ce60f
children
comparison
equal deleted inserted replaced
4:6ec33e2ce60f 5:c89738f3f417
1 cropresize 1 cropresize
2 ========== 2 ==========
3 3
4 cropresize uses PIL to crop and resize an image as appropriate for web 4 cropresize uses `PIL <http://www.pythonware.com/products/pil/>`_
5 to crop and resize an image as appropriate for web
5 presentation. cropresize is a convenience package that allows image 6 presentation. cropresize is a convenience package that allows image
6 resizing without aspect ratio distortion. 7 resizing without aspect ratio distortion.
7 8
8 API 9 API
9 --- 10 ---
10 11
11 cropresize contains one useful function, ``cropresize.crop_resize``. 12 cropresize contains one useful function, ``cropresize.crop_resize``.
12 The function takes three arguments: 13 The function takes three arguments:
13 14
14 * image: a PIL image object 15 * image: a `PIL image <http://www.pythonware.com/library/pil/handbook/image.htm>`_ object
15 * size: a 2-tuple of (width,height); at least one must be specified 16 * size: a 2-tuple of (width,height); at least one must be specified
16 * exact_size: whether to scale up for smaller images 17 * exact_size: whether to scale up for smaller images
17 18
18 See ``cropresize.crop_resize.__doc__`` for the function 19 See ``cropresize.crop_resize.__doc__`` for the function
19 documentation. ``crop_resize`` returns the cropped and resized PIL image. 20 documentation. ``crop_resize`` returns the cropped and resized PIL image.
24 25
25 The command line program, ``crop-resize``, is included in this python 26 The command line program, ``crop-resize``, is included in this python
26 package. The help for the program is displayed by running 27 package. The help for the program is displayed by running
27 ``crop-resize`` with no arguments or ``crop-resize --help``. 28 ``crop-resize`` with no arguments or ``crop-resize --help``.
28 29
30
31 Future Work
32 -----------
33
34 cropresize is written as a convenience function to PIL as this
35 methodology for cropping and resizing images is often desired for
36 presentation, particularly on the web. Since the utility is in
37 demand, the functionality should be ported upstream to PIL.
38
29 -- 39 --
30 40
31 http://k0s.org/portfolio/software.html#cropresize 41 http://k0s.org/portfolio/software.html#cropresize