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/jpeg-utils.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/jpeg-utils.h')
| -rw-r--r-- | src/jpeg-utils.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jpeg-utils.h b/src/jpeg-utils.h index 65e97c5..e31ed52 100644 --- a/src/jpeg-utils.h +++ b/src/jpeg-utils.h @@ -21,6 +21,9 @@ #endif #include <glib.h> +#include "setup.h" + +#define SQUARED_SIMPLE_SHAVE_AMOUNT 5 /* percent */ /* TODO: we want to have numerical values here at some point in the future */ @@ -68,7 +71,8 @@ void free_exif_data (TExifData *data); gboolean resize_image (const gchar *src, const gchar *dst, int size_x, int size_y, int quality, - gboolean thumbnail); + gboolean thumbnail, + ThumbnailSquareType squared_thumbnail_type); /* * get_image_sizes: retrieve image dimensions |
