From d982fa6f55588ada8e5dd1bcb680ac817fcc5de4 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Tue, 4 Oct 2016 21:54:28 +0200 Subject: 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 ( section) with the following syntax: --- src/generators.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/generators.c') 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 * -- cgit v1.2.3