annotate README.txt @ 4:6ec33e2ce60f

more documentation
author k0s <k0scist@gmail.com>
date Sat, 06 Mar 2010 13:22:31 -0500
parents 2be0070c6f95
children c89738f3f417
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
1 cropresize
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
2 ==========
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
3
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
4 cropresize uses PIL to crop and resize an image as appropriate for web
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
5 presentation. cropresize is a convenience package that allows image
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
6 resizing without aspect ratio distortion.
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
7
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
8 API
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
9 ---
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
10
4
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
11 cropresize contains one useful function, ``cropresize.crop_resize``.
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
12 The function takes three arguments:
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
13
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
14 * image: a PIL image object
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
15 * size: a 2-tuple of (width,height); at least one must be specified
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
16 * exact_size: whether to scale up for smaller images
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
17
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
18 See ``cropresize.crop_resize.__doc__`` for the function
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
19 documentation. ``crop_resize`` returns the cropped and resized PIL image.
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
20
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
21
2
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
22 Command Line
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
23 ------------
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
24
3
2be0070c6f95 path-independent way of getting the description
k0s <k0scist@gmail.com>
parents: 2
diff changeset
25 The command line program, ``crop-resize``, is included in this python
2be0070c6f95 path-independent way of getting the description
k0s <k0scist@gmail.com>
parents: 2
diff changeset
26 package. The help for the program is displayed by running
2be0070c6f95 path-independent way of getting the description
k0s <k0scist@gmail.com>
parents: 2
diff changeset
27 ``crop-resize`` with no arguments or ``crop-resize --help``.
4
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
28
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
29 --
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
30
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
31 http://k0s.org/portfolio/software.html#cropresize