diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2016-10-04 21:54:28 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2016-10-04 21:54:28 +0200 |
| commit | d982fa6f55588ada8e5dd1bcb680ac817fcc5de4 (patch) | |
| tree | 0de45bd9219c49ccd77d4cb6cdae0d55a78a582b /src/generators.c | |
| parent | ddd9556689af055355a07cf2766fe95eaed4e38e (diff) | |
| download | cataract-d982fa6f55588ada8e5dd1bcb680ac817fcc5de4.tar.xz | |
items: Add option to shave image borders
A workaround for badly exported images that contain some garbage
at the borders. The amount specifies how many pixels should be shaved
from all borders (i.e. amount of 2 results in 4x4 pixels loss).
Applicable for particular items or whole album (<general> section)
with the following syntax:
<shave amount="1" />
Diffstat (limited to 'src/generators.c')
| -rw-r--r-- | src/generators.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/generators.c b/src/generators.c index d6984be..5094086 100644 --- a/src/generators.c +++ b/src/generators.c @@ -318,6 +318,8 @@ metadata_apply_overrides (ExifData *exif_data, exif_data->thumbnail_crop_style = image_size->is_thumbnail ? image_size->thumb_crop_style : CROP_STYLE_NORMAL; exif_data->thumbnail_crop_hint = get_prop_int (items, item, PROP_THUMB_CROP_HINT, CROP_HINT_UNDEFINED); + + exif_data->shave_amount = get_prop_int (items, item, PROP_SHAVE_AMOUNT, 0); } static char * |
