annotate README.txt @ 8:eb0f4870a019 default tip

depend on pillow which exists
author Jeff Hammel <k0scist@gmail.com>
date Tue, 03 Nov 2020 08:04:33 -0800
parents c89738f3f417
children
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
5
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
4 cropresize uses `PIL <http://www.pythonware.com/products/pil/>`_
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
5 to crop and resize an image as appropriate for web
2
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
6 presentation. cropresize is a convenience package that allows image
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
7 resizing without aspect ratio distortion.
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
8
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
9 API
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
10 ---
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
11
4
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
12 cropresize contains one useful function, ``cropresize.crop_resize``.
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
13 The function takes three arguments:
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
14
5
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
15 * image: a `PIL image <http://www.pythonware.com/library/pil/handbook/image.htm>`_ object
4
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
16 * size: a 2-tuple of (width,height); at least one must be specified
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
17 * exact_size: whether to scale up for smaller images
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
18
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
19 See ``cropresize.crop_resize.__doc__`` for the function
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
20 documentation. ``crop_resize`` returns the cropped and resized PIL image.
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
21
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
22
2
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
23 Command Line
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
24 ------------
0676435d1186 include README file; bump version
k0s <k0scist@gmail.com>
parents:
diff changeset
25
3
2be0070c6f95 path-independent way of getting the description
k0s <k0scist@gmail.com>
parents: 2
diff changeset
26 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
27 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
28 ``crop-resize`` with no arguments or ``crop-resize --help``.
4
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
29
5
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
30
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
31 Future Work
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
32 -----------
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
33
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
34 cropresize is written as a convenience function to PIL as this
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
35 methodology for cropping and resizing images is often desired for
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
36 presentation, particularly on the web. Since the utility is in
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
37 demand, the functionality should be ported upstream to PIL.
c89738f3f417 * improve command line interface
k0s <k0scist@gmail.com>
parents: 4
diff changeset
38
4
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
39 --
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
40
6ec33e2ce60f more documentation
k0s <k0scist@gmail.com>
parents: 3
diff changeset
41 http://k0s.org/portfolio/software.html#cropresize