summaryrefslogtreecommitdiffstats
path: root/macosx/HBJob+HBJobConversion.m
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2017-06-01 14:20:10 -0400
committerGitHub <[email protected]>2017-06-01 14:20:10 -0400
commitce086e0db9813a093fcb89cd135d5313fdb8d550 (patch)
tree169d710e63a7e8f29c9c658a66dff6cc490687cb /macosx/HBJob+HBJobConversion.m
parent5a428013a64cbabaf3fe0ac1f86984c41eb1cf9c (diff)
mac: Add support for sharpening filters. (#760)
Thanks @galad87 for assistance.
Diffstat (limited to 'macosx/HBJob+HBJobConversion.m')
-rw-r--r--macosx/HBJob+HBJobConversion.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/macosx/HBJob+HBJobConversion.m b/macosx/HBJob+HBJobConversion.m
index 852603e40..3a28629a9 100644
--- a/macosx/HBJob+HBJobConversion.m
+++ b/macosx/HBJob+HBJobConversion.m
@@ -489,6 +489,24 @@
self.picture.cropTop, self.picture.cropBottom,
self.picture.cropLeft, self.picture.cropRight].UTF8String);
+ // Sharpen
+ if (![self.filters.sharpen isEqualToString:@"off"])
+ {
+ int filter_id = HB_FILTER_UNSHARP;
+ if ([self.filters.sharpen isEqualToString:@"lapsharp"])
+ {
+ filter_id = HB_FILTER_LAPSHARP;
+ }
+
+ hb_dict_t *filter_dict = hb_generate_filter_settings(filter_id,
+ self.filters.sharpenPreset.UTF8String,
+ self.filters.sharpenTune.UTF8String,
+ self.filters.sharpenCustomString.UTF8String);
+ filter = hb_filter_init(filter_id);
+ hb_add_filter_dict(job, filter, filter_dict);
+ hb_dict_free(&filter_dict);
+ }
+
// Add grayscale filter
if (self.filters.grayscale)
{