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 /src/setup.h | |
| 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 'src/setup.h')
| -rw-r--r-- | src/setup.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/setup.h b/src/setup.h index 8c9927f..16665c4 100644 --- a/src/setup.h +++ b/src/setup.h @@ -32,6 +32,11 @@ #define DEFAULT_INDEX_FILENAME "index.html" +typedef enum { + THUMBNAIL_SQUARE_TYPE_NONE, + THUMBNAIL_SQUARE_TYPE_SIMPLE +} ThumbnailSquareType; + /* Global gallery setup */ typedef struct { @@ -52,6 +57,7 @@ typedef struct { gchar *img_big_dir; gchar *img_orig_dir; gchar *thumbnail_name_format; + ThumbnailSquareType squared_thumbnail_type; gchar *footer; gchar *meta_author; @@ -65,6 +71,7 @@ typedef struct { unsigned long thumbnail_landscape_height; unsigned long thumbnail_portrait_width; unsigned long thumbnail_portrait_height; + unsigned long thumbnail_square_size; int preview_quality; unsigned long preview_landscape_width; |
