diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-10-09 21:20:13 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-10-09 21:20:13 +0200 |
| commit | 69d1615d7dc7500039dbde951fa6cbb920eb99b8 (patch) | |
| tree | 93942d2a2dfe7a3996c3b3d217de0955000daa1d /sample | |
| parent | a1e7a92e93e4760863105ae9f61ced93510e8cb2 (diff) | |
| download | cataract-69d1615d7dc7500039dbde951fa6cbb920eb99b8.tar.xz | |
Add support for squared thumbnails
Disabled by default, only very simple center crop implemented.
The SQUARED_SIMPLE_SHAVE_AMOUNT constant may be slightly adjusted
according to future experience. It's a really dumb algorithm which
may not be suitable for every picture.
Looking for a fast and smart algorithm to determine image weight center
and radius, i.e. focus on object of interest. The OpenCV's face recognition
features are worth to test and consider, though I fear the speed issues.
Diffstat (limited to 'sample')
| -rw-r--r-- | sample/src/setup.xml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sample/src/setup.xml b/sample/src/setup.xml index 80d04da..72ce9dd 100644 --- a/sample/src/setup.xml +++ b/sample/src/setup.xml @@ -34,6 +34,7 @@ <!-- default sizes of thumbnail and preview images --> <thumbnail landscape_w="180" landscape_h="120" portrait_w="120" portrait_h="180" + square="180" quality="80" /> <preview landscape_w="900" landscape_h="600" portrait_w="500" portrait_h="750" @@ -70,6 +71,12 @@ <!-- %d is optional, denotes item index in the album --> <!-- this also avoids conflicts with identical names --> <thumbnail_name_format>thn_%d_%s</thumbnail_name_format> + + <!-- Make thumbnails squared, crop in different ways: --> + <!-- none - no squared thumbnails, retain previous behaviour (default) --> + <!-- simple - crop from center, shave 5% from borders --> + <!-- ... more to come! (looking for a fast and clever algorithm) --> + <squared_thumbnails type="none" /> </images> <meta> |
